View Full Version : javascript form


Bouley86
03-15-2003, 08:52 PM
Hi! I've been looking around for a few days now for some help and haven't been able to get any. This is what I want to be able to do. Let's say there's a text field and you type something in it and then that work gets put into the text box below as part of the link..so here's what I'd like it to look like:

-------------------------
| Word | <-- a word is entered here
-------------------------
-----------
|SUBMIT| <-- When you click here
-----------
------------------------------------------------------------------
|http://www.domain.com/page.php?what=Word |
| |
| |
-------------------------------------------------------------------
^a link is then created in the empty text box that has the word (in this example "Word") in it

Any ideas?
Thanks for your help!

pb&j
03-16-2003, 07:04 AM
Try saving this as "test.html" and playing around with it...

<html>
<body>
<form name="myform" action="test.html">
<input type="text" name="entry"><br>
<input type="submit" value="submit" onclick="document.myform.foo.value='http://www.domain.com/page.php?what='+document.myform.entry.value;return false;"><br>
<textarea name="foo"></textarea><br>
</form>
</body>
</html>

Bouley86
03-16-2003, 02:52 PM
I actually figured something out by playin around with a meta tag generator script..but thanks!