Br**************@gmail.com wrote:
Hi whats the easiest way to pass text from one page to another.
I have a form on one page that has a textbox and "go" button.
when the user selects Go, i would like it to go to another window
with the text he/she already inputed filled in the textbox.
Hi,
The easiest way is to use a serverside language, like PHP.
If that is no option, just pass the text to the next page using the URL.
From your first page:
<form action="nextpage.html" METHOD="GET">
<input type="text" name="yourname">
<input type="button" value="go">
</form>
If somebody filled in "Joe Jackson", the URL will contain:
nextpage.html?yourname=Joe%20Jackson
From nextpage.html
<script type="text/javascript">
// get the passed value for yourname
var query = location.search.substring(1);
// query now contains yourname=Joe%20Jackson
// now do basic stringmanipulation to retrieve the actual name.
</script>
Regards,
Erwin Moller