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!
"Simple" Form Question ...
Moderator: General Moderators
-
jmueller0823
- Forum Commoner
- Posts: 37
- Joined: Tue Apr 20, 2004 9:06 pm
- tasteslikepurple
- Forum Commoner
- Posts: 46
- Joined: Thu Jan 26, 2006 3:38 am
- Location: Bath, UK
you could do:
and that will print out the value of the email variable.
Code: Select all
<?php
echo $_GET["email"];
?>Re: "Simple" Form Question ...
Perhaps it should bejmueller0823 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!
Code: Select all
<script type="text/javascript">
document.write(document.myForm.email.value);
</script>Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Code: Select all
document.forms['myForm'].elements['email'].value