Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to output data from your last form?

Status
Not open for further replies.

RedLion

Programmer
Sep 13, 2000
342
NL
Hello,

I searched everywhere, but I can't find it anywhere. I've got one form where the user can put his info. And an otherside which is there for previewing before posting it to the mail ( .pl) but how can I make the preview page?

<!-- form.htm -->

<html>
<head>
<body>

<form action=&quot;preview.htm&quot; method=&quot;post&quot; name=&quot;myForm&quot;>
<input type=&quot;text&quot; name=&quot;Name&quot; value=&quot;George&quot;>
<input type=&quot;submit&quot;>

</body>
</head>
</html>

<!-- preview.htm -->

<html>
<head>
<body>

Your info to submit:

name:
<script language=&quot;JavaScript&quot;>
document.write(form.myForm.Name.value)
</script>

</body>
</head>
</html>

What am I doing wrong at preview.htm? It seems that I call the form var's not well?

Thanks,

Charl
 
see my answer in teh DHTML forum. Please don't cross-post.

nick bulka

 
Yes Nick, I had posted the message at first at DHTML when I was searching for an answer I saw the JavaScript forum and thaugt it had to be posted here instead of the DHTML, so I'll do it the next time.

Only it's still not working!

Charl
 
Charl,
Try changing the name of the field. It's not a good idea to use the same name as javascript or html objects or attributes. (name is an attribute of just about every object.)

nick bulka

 
Thanks Nick, but it didn't help.
When I use:

document.write(&quot;Hello&quot;)

The output is: Hello

So the problem is using the var's from the first form, and not writing text to page. It seems it doesn't reconise the vars in the second form. (How can I test if it reconises the var's? )

Charl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top