Forum Moderators: open

Message Too Old, No Replies

Write form elements with javascript to querystring

can I compose a querystring with form elements?

         

Mobull

9:10 pm on May 2, 2004 (gmt 0)

10+ Year Member



I have a small webshop where people can buy goods. The store was a readymade store like you have many on the Inet. It is based on Javascript.
In a html form people have to fill in a form with their address and names etc.

when they press send, a new page shows with their order. They can print or close this orderform. When they close an Unload script in the body opens a "Thank you page" in which I (guess what) thank the people for their order. Now I want to address this thank you page to those people who ordered like:
Dear Mrs. de Wilde,...
I don't know how I can do this. My Javascript skills are not that good, so please don't flame me for not knowing how to do it. I can use asp if that is needed...

Here's the code you might need:
The function RF1 reads the form's elements from the html page.
----------------------------

<script>
var name = RF1("Gender")+RF1("Initials")+RF1("LastName");
function bbghu(){
window.open('../scripts/thankyou.asp?'+name, 'thanks','');}
</script>

<body onUnload="bbghu()">
.....
Your Order:
.....
<SCRIPT LANGUAGE='JavaScript'>RF1("Gender");</script>
<SCRIPT LANGUAGE='JavaScript'>RF1("Initials");</script>&nbsp;
<SCRIPT LANGUAGE='JavaScript'>RF1("LastName");</script>

....
....
</body>

------------------------------

What am I doing wrong since what I get now is

Mobull

1:13 pm on May 6, 2004 (gmt 0)

10+ Year Member



No-one who can help me?

Rambo Tribble

1:45 pm on May 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I presume, from your code, that you are trying to open a window and have the title of the window be the greeting. To do that I believe you will need to make the HTML <title></title> of the document that loads in the window have a value of the desired character string. In other words, something like:

document.write('<title>'+var_name+'</title>');