Hello,
I have tow JavaScripts
this first one asks for user name and creates the temp variable
This second one takes the temp variable and iserts the text into the updatedby field
this works great on the page, but what I am trying to accomplish is that when have a page with the script like above that when a user enters their name it redirects them to the proper page. I have accomplish this. what I cannot figure out is how can I pass the temp variable to the new page (page1.asp, page2.asp and page3.asp)
I have tow JavaScripts
Code:
<script language="JavaScript">
temp= window.prompt ("Please Type Your Name" , "");
if (temp=="") { window.location="[URL unfurl="true"]http://daviesintranet/rma1/redirect.asp?id=<%[/URL] = Cdbl((rsGuestbook("ID")))%>";}
else if (temp=="user1"|| temp=="user2") { window.location="[URL unfurl="true"]http://mywebsite.com/page1.asp?id=<%[/URL] = Cdbl((rsGuestbook("ID")))%>";}
else if (temp=="user3"|| temp=="user4") { window.location="[URL unfurl="true"]http://mywebsite.com/page2.asp?id=<%[/URL] = Cdbl((rsGuestbook("ID")))%>";}
else if (temp=="user5"|| temp=="user6") { window.location="[URL unfurl="true"]http://mywebsite.com/page3.asp?id=<%[/URL] = Cdbl((rsGuestbook("ID")))%>";}
</script>
This second one takes the temp variable and iserts the text into the updatedby field
Code:
<script>
function initialize()
{
document.forms['form'].elements['updatedby'].value = temp ;
}
</script>
this works great on the page, but what I am trying to accomplish is that when have a page with the script like above that when a user enters their name it redirects them to the proper page. I have accomplish this. what I cannot figure out is how can I pass the temp variable to the new page (page1.asp, page2.asp and page3.asp)