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

Can't Pass Form Elements to a Page in New Window

Status
Not open for further replies.

scripter73

Programmer
Apr 18, 2001
421
US
I’m not sure if this belongs on the JSP forum, the CFM forum, or HTML, but I’ll start here.

I have a JSP page that has an embedded HTML form:

Index.jsp:

<html>
<body>

…..embedded HTML form

<form name="CustEntry" method="post" action="javascript:window.open('">
<input name="CustNumber" type="text" size="20" maxlength="20"><br><br>

<a href="#" onClick="document.CustEntry.submit();" border=0><img src="images/submitBut.gif" border="0" width="69" height="17"></a>
</form>


</body>
</html>

As long as I don’t have the “javascript:window.open() function” in the action, my form field CustNumber gets passed to the new screen with no problem, but now when I add the window.open(), I get a complaint on the new screen that it cannot find the form element.

Why was the form element not found?

Thanks in advance.

Scripter73



Change Your Thinking, Change Your Life.
 
try this method instead...
Code:
<form name="CustEntry" method="post" action="[URL unfurl="true"]http://webserver/CustProject/validScreen.cfm"[/URL] target=_blank>

Tony
reddot.gif WIDTH=500 HEIGHT=2 VSPACE=3

 
Thanks for your response, but I added that. I replace the open.window() with target=_blank and I can't get the form to submit, and I have a "Error on Page" in the bottom corner of my browser.

Here's what I have:

<form name="CustEntry" method="post" target="_blank" action=" <input name="CustNumber" type="text" size="20" maxlength="20"><br><br>


<a href="#" onClick="document.CustEntry.submit();" border=0><img src="images/submitBut.gif" border="0" width="69" height="17"></a>
</form>



And this is contained in an include file to be used by my .jsp.

Thanks for any assistance.

scripter73


Change Your Thinking, Change Your Life.
 
instead of using this...
Code:
<a href="#" onClick="document.CustEntry.submit();" border=0><img src="images/submitBut.gif" border="0" width="69" height="17"></a>
try this...
Code:
<INPUT TYPE="IMAGE" SRC="images/submitBut.gif" BORDER="0" WIDTH="69" HEIGHT="17" VALUE="SUBMIT"></INPUT>

Tony
reddot.gif WIDTH=500 HEIGHT=2 VSPACE=3

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top