hmmmm, perhaps I didn't layout the scenario well enough. Let's try this sample...
Create two HTML pages, call one page1.htm, the other call page2.htm. Put the code for each page accordingly...
page1.htm:
<html>
<head>
<script>
function doSaveClick() {
window.maintframe.document.forms(0).submit();
}
</script>
</head>
<body>
<center>
<input type=button id="save" name="save" value="save" onclick="javascript:doSaveClick();">
<p>
<iframe height="300" width="300" id="maintframe" name="maintframe" border="1" frameborder=1 scrolling="auto" src="page2.htm"></iframe>
</center>
</body>
</html>
page2.htm:
<html>
<head>
<script>
function doVerify() {
alert('Doing the verify function!');
}
</script>
</head>
<body>
<form id=maint name=maint onsubmit="return doVerify()">
Enter something: <input type=text id=txtText name=txtText>
<p>
Enter something else: <input type=text id=Text2 name=txtText2>
</form>
</body>
</html>
Then pull up page1.htm, and click the "Save" button. The form in the iframe submits, but the function doVerify is never executed. Is there a way to make that function fire? Or, is there a way to call doVerify from the button click?
Thanks for your help...
|