Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can you return data to a page that did not submit it

Status
Not open for further replies.

49er

Programmer
Aug 24, 2000
38
0
0
US
I have a web page with a form that gathers user preferences. When those are submitted, I want the returning data to be sent to a different page.
1. When a form is submitted, can a new page automatically be loaded?
2. Can the returning string be sent to this newly loaded page?

Any ideas would be GREATLY appreciated.
 
"1. When a form is submitted, can a new page automatically be loaded?
2. Can the returning string be sent to this newly loaded page?"
actually it's how forms are supposed to work !
<form name=&quot;whatever&quot; action=&quot;page.htm&quot;>
your input fields
</form>
this will send all the datas to page.htm, and also load page.htm ! !!!!! nothing more to do :)
 
Then how do you access it on that newly opened page? How do you access the query string using JavaScript?

It seems that the original intended useage of forms is long forgotten eh?
 
you access it with this:

window.location.search

this property holds the querystring from the &quot;?&quot; on
Then you have to parse through it somehow (I have a function to do this if you want)

if you don't mind using server-side jscript and naming your file ASP you can use:

<%
myvalue=Request.QueryString(&quot;variableinquerystring&quot;)
%>
jared@aauser.com
 
if it is for validation purpose, you should place the validation functions in the sending page
tell me if it's the case i'll show you how
 
Forms are meant for server-side scripting, not client-side. Sure you can access the query string via JavaScript, but if you want some serious functionality, then use CGI. Learn some Perl.
Sincerely,

Tom Anderson
CEO, Order amid Chaos, Inc.
 
Or, since you already know javascript (jscript) you can use ASP. jared@aauser.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top