Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Passing values between webpages

Hi, Im new to Web design, now im creating a web site I need to pass a name on one page to another page by clicking a button on the 1st page.

sample

PageA.html (when user click a button) the text "Booking is ready" should fill text field on the pageB.html page.

Could any one help me to do this. My domain not support Asp.net.

Comments

  • skaa7skaa7 Posts: 33Member
    For example, this way:

    PageA.html
    [code]

    PageA.html

    function fnPass()
    {
    var otext;

    otext=document.getElementById('idTextToPass');
    location.href='PageB.html?texttopass='+otext.value;
    }



    Text to Pass:



    [/code]

    PageB.html
    [code]

    PageB.html

    function fnOL()
    {
    var nc;
    var stext;
    var otext;

    stext='';
    nc=location.href.indexOf('?');
    if(nc>=0)
    {
    stext=location.href.substr(nc+1);
    nc=stext.indexOf('=');
    if(nc>=0)
    stext=stext.substr(nc+1);
    }

    otext=document.getElementById('idPassedText');
    otext.value=stext;
    }



    Passed Text:

    [/code]
  • allenaryallenary Posts: 2Member
    I don't understand all of them, but i feel thankfully.
  • allenaryallenary Posts: 2Member
    I don't understand all of them, but i feel thankfully.
  • johnwatson85johnwatson85 Posts: 1Member
    Hey that was really helpful and i would like you to visit www(dot)ebizsitedesigns(dot)com(dot)au
Sign In or Register to comment.