Page 1 of 1

"Simple" Form Question ...

Posted: Sat Feb 04, 2006 1:07 pm
by jmueller0823
We are passing a value (an email address) to a form like so:

http://www.site.com/form.htm?email=email@email.com

...The value passes successfully.

We would like to display that value on the page.
I thought something like this might work:

<script langauge="JavaScript">
document.write(document.forms.myForm.email.value);
</script>

...But it does not display. Ideas?

We could of course show the value in an email field,
but we prefer not to show a form field.

Thanks!

Posted: Sat Feb 04, 2006 2:12 pm
by tasteslikepurple
you could do:

Code: Select all

<?php
echo $_GET["email"];
?>
and that will print out the value of the email variable.

Re: "Simple" Form Question ...

Posted: Sat Feb 04, 2006 2:50 pm
by s.dot
jmueller0823 wrote:We are passing a value (an email address) to a form like so:

http://www.site.com/form.htm?email=email@email.com

...The value passes successfully.

We would like to display that value on the page.
I thought something like this might work:

<script langauge="JavaScript">
document.write(document.forms.myForm.email.value);
</script>

...But it does not display. Ideas?

We could of course show the value in an email field,
but we prefer not to show a form field.

Thanks!
Perhaps it should be

Code: Select all

<script type="text/javascript">
document.write(document.myForm.email.value);
</script>

Posted: Sat Feb 04, 2006 6:43 pm
by feyd

Code: Select all

document.forms['myForm'].elements['email'].value