kate99
asked on
Submit form from different frame
Each method I have used so far seems to ignore the onsubmit event handler on the form in frame1.
Any ideas?
frame1.htm:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form name="form1" method="post" onsubmit="return verify(this);"
action="../screens/xmlCrea te.jsp">
<textarea name="field1" cols="50" rows="4"></textarea>
</form>
</body>
</html>
frame2.htm
<html>
<head>
<title>Untitled Document</title>
</head>
<body>
<a href="javascript:parent.mf _mainFrame .form1.sub mit();">Su bmit</a>
</body>
</html>
Any ideas?
frame1.htm:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form name="form1" method="post" onsubmit="return verify(this);"
action="../screens/xmlCrea
<textarea name="field1" cols="50" rows="4"></textarea>
</form>
</body>
</html>
frame2.htm
<html>
<head>
<title>Untitled Document</title>
</head>
<body>
<a href="javascript:parent.mf
</body>
</html>
Like this:
<a href="#" onClick="if(parent.mf_main Frame.veri fy(parent. mf_mainFra me.form1) parent.mf_mainFrame.form1. submit;ret urn false">Submit</a>
<a href="#" onClick="if(parent.mf_main
Sorry, take this:
<a href="#" onClick="if(parent.mf_main Frame.veri fy(parent. mf_mainFra me.form1) parent.mf_mainFrame.form1. submit();r eturn false">Submit</a>
<a href="#" onClick="if(parent.mf_main
ASKER
Thanks for your reply's.
In the end this worked:
<a href="#" onClick="if(parent.mf_main Frame.veri fy(parent. mf_mainFra me.form1)) parent.mf_ mainFrame. form1.subm it();">Sub mit</a>
What shall i do with the points? Netgroove's answer was nearest. Anyway let me know.
Cheers
In the end this worked:
<a href="#" onClick="if(parent.mf_main
What shall i do with the points? Netgroove's answer was nearest. Anyway let me know.
Cheers
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You should return false so that the link will not be followed.
>>nearest?
If your not satisfied, then tell us whats not right for you and we will try to suit your needs.
You have 2 options with the points
1 accept the answer that fullfills your requirements.
2 split the points between the experts that helped you.
Good Luck
jAy
>>nearest?
If your not satisfied, then tell us whats not right for you and we will try to suit your needs.
You have 2 options with the points
1 accept the answer that fullfills your requirements.
2 split the points between the experts that helped you.
Good Luck
jAy
Thanks for the points.
or
<a href="#" onclick="parent.frames['fr