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

  • 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]
  • I don't understand all of them, but i feel thankfully.
  • I don't understand all of them, but i feel thankfully.
  • 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.

Howdy, Stranger!

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

Categories