|
-
November 12th, 2002, 04:11 AM
#1
document.write problem, onSubmit function not called
below code does not call doSubmit() function but POSTs the page.
Whats wrong with that line?
Any idea?
Thanks
Nazire
---------------------------
function doInit()
{
var d=parent.workSpace.document;
d.open();
d.write("<html>\n");
d.write("<STYLE type=\"text/css\">\n");
d.write("body.eMxBody {background-color:#EEEEEE }\n");
d.write("</STYLE>\n");
d.write("<body class=\"eMxBody\">\n");
d.write("<FORM name=\"cncExecSpliceForm\" id=\"cncExecSplice\" method=POST onSubmit=\"doSubmit()\" action=\"/wls/cncexec/cncExecServlet?action=Splice
& param=cmplt\">\n")
......
......
}
-
November 12th, 2002, 01:07 PM
#2
How is the submit being invoked? If you submit the form in code:
Code:
document.form.submit();
the onSubmit event does not fire.
- Shawn
MCP, VB6: Desktop Apps
[ C# | VB | .NET | Java | VC++ | Perl | PHP | Javascript ]
Unless otherwise stated, all sample code provided is UNTESTED.
http://www.codemastershawn.com
-
November 13th, 2002, 01:46 AM
#3
I did not understand where to put that line.
in the d.write("....")?
or where?
-
November 13th, 2002, 11:07 PM
#4
I'm not telling you to put that line anywhere. I'm saying if you are submitting the form programatically - by issuing that command - then the onSubmit event will not be triggered.
How is the form being submitted?
- Shawn
MCP, VB6: Desktop Apps
[ C# | VB | .NET | Java | VC++ | Perl | PHP | Javascript ]
Unless otherwise stated, all sample code provided is UNTESTED.
http://www.codemastershawn.com
-
November 14th, 2002, 01:19 AM
#5
That is right, it does not submit the form, and it was my original question hot to submit that from.
One solution could be to implement two frames and write dynamic and static contents into appropriate frame. So, right now I am try'ng to understand how to create two frames within one frame dynamically in a jsp page.
any idea, or comments?
-
November 14th, 2002, 10:35 PM
#6
Originally posted by nazire
That is right, it does not submit the form, and it was my original question hot to submit that from.
I don't follow you. You want to know how to submit the form programatically (in the code - without user input)?
One solution could be to implement two frames and write dynamic and static contents into appropriate frame.
Frames don't have anything to do with posting forms.
So, right now I am try'ng to understand how to create two frames within one frame dynamically in a jsp page.
JSP? You were talking about Javascript in the original post. Are you trying to do this with Javascript or JSP?
- Shawn
MCP, VB6: Desktop Apps
[ C# | VB | .NET | Java | VC++ | Perl | PHP | Javascript ]
Unless otherwise stated, all sample code provided is UNTESTED.
http://www.codemastershawn.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|