How do I send like one form entry to a text area in a new page??? does it need java script??? or is there a code???
How do I send like one form entry to a text area in a new page??? does it need java script??? or is there a code???
This was discussed a while ago. A referral was made to a script designed to parse GET variables from URIs, but I can't seem to find it again; perhaps John or Mike knows where it is?
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
If you Google:
"site:http://www.dynamicdrive.com/forums/archive/ var1 jscheuer1"
without the quotes, you will find tons of examples. A basic approach could be, to have on the sending page:
and your receiving page could look like this:Code:<input id="sendInfo" type="text" value="default"><br> <a href="somepage.htm" onclick="location.href=this.href+'?var1='+escape(document.getElementById('sendInfo').value);return false;">Link</a>
Code:<html> <head> <title>Somepage</title> <script type="text/javascript"> function populate() { var str = unescape(location.href); thePos = str.indexOf("=") + 1; document.getElementById('recInfo').value=str.substr(thePos); } window.onload=populate; </script> </head> <body> <input id="recInfo" type="text"> </body> </html>
Last edited by jscheuer1; 07-28-2005 at 12:04 AM.
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
There we are.
You can use a form too:
HTML Code:<form action="somepage.htm" method="get"> <input type="text" id="sendInfo"/> <input type="submit"/> </form>
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
That would be:
Using id instead of name, as Twey did in his example will not send anything. Probably just an honest slip, I'm sure Twey knows better. I'm so unfamiliar with forms that I didn't even bother trying to figure it out. Once I saw Twey's example I thought, "Right, that's what I was trying to think of." So, I am grateful for the effort.Code:<form action="somepage.htm" method="get"> <input type="text" name="sendInfo"/> <input type="submit"/> </form>
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Bookmarks