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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form data not being passed...?

Status
Not open for further replies.

buzzt

Programmer
Joined
Oct 17, 2002
Messages
171
Location
CA
When I set the action of my form to the processing page, everything works great. But if I use a javascript to open the processing page in a new window, the form data is not passed. What should I do?

Here is the Javascript:
<script language=&quot;JavaScript&quot; type=&quot;text/JavaScript&quot;>
<!--
function openBrWindow(theURL,winName,features) {
window.open(theURL,winName,features);
}
//-->
</script>


Here is the form code:
<form name=number method=post>
Number of Tickets: <input type=text size=3 maxlength=3 name=number value=&quot;1&quot;>  <input type=submit value=Submit onClick=&quot;openBrWindow('</form>
 
No, there is not.

Opening the script in a new window is not enough -- you must also pass the necessary variables into the script.

Including the variables and values on the URL is exactly what your web browser does when you submit data through a GET-method HTML form.

Want the best answers? Ask the best questions: TANSTAAFL!!
 
well i can sugest an alternative method. open up an html page with a lot of hidden fields. when the HTML page opens using javascript fill all the values from the opening page to the hidden fileds. now submit the HTML page.

it is a tiresome method. but still it is a method... :)

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top