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
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]