OutInLeftField
Programmer
Hello,
This is a doozy.
I am trying to validate a form in Frame B from Frame A's submit button.
The frameset looks like:
<FRAMESET rows="85%, 15%">
<FRAME src="<%=session("passedValue")%>" name ="Page1"/>
<FRAME src="Submit.asp" name ="Submit"/>
</FRAMESET>
The sessionobject is whatever the previous page's input value of the pagename (see below explanation) passed.
because each page has session("passedValue") =request("NextPage"). When someone refreshes the page, I want the current page to reload. So on each page in the form element I have:
<input type ="hidden" name = "NextPage" value ="mypagename.asp"/>
this keeps the page from going to the next page if the user refreshes the page and reloads the current page name passed from the previous page.
The parent has:
...
function frame2()
{
parent.Page1.document.FormSubmit.submit();
}
function frame2Reset()
{
parent.Page1.document.FormSubmit.reset();
}
--> -->
</script>
(within the form element)
<input type="button" value = "Next Page" name ="Submit" onclick ="frame2()"/>
<input type ="button" Value = "Clear Form" name ="Reset" onclick ="frame2Reset()"/>
Now. on each page I have js scripts to check for errors. If a certain field is incorrect, I change the color of that value to red. I also increment a counter at that point. At the end of the page what I want to do is see if the count of the red values > 0 then stop submission. I cannot use onsubmit="myfunction()" on each page because the frame has the form.submit (see above).
So lies the problem. When I click on Submit in the lower frame, the function to validate the current page is never executed because the lower frame has the: parent.Page1.document.FormSubmit.submit();
1. Is there a way within in the submit function in the parent to check the count?
2. Is there a way to stop submission within the frame if the count > 0?
thank you very much
This is a doozy.
I am trying to validate a form in Frame B from Frame A's submit button.
The frameset looks like:
<FRAMESET rows="85%, 15%">
<FRAME src="<%=session("passedValue")%>" name ="Page1"/>
<FRAME src="Submit.asp" name ="Submit"/>
</FRAMESET>
The sessionobject is whatever the previous page's input value of the pagename (see below explanation) passed.
because each page has session("passedValue") =request("NextPage"). When someone refreshes the page, I want the current page to reload. So on each page in the form element I have:
<input type ="hidden" name = "NextPage" value ="mypagename.asp"/>
this keeps the page from going to the next page if the user refreshes the page and reloads the current page name passed from the previous page.
The parent has:
...
function frame2()
{
parent.Page1.document.FormSubmit.submit();
}
function frame2Reset()
{
parent.Page1.document.FormSubmit.reset();
}
--> -->
</script>
(within the form element)
<input type="button" value = "Next Page" name ="Submit" onclick ="frame2()"/>
<input type ="button" Value = "Clear Form" name ="Reset" onclick ="frame2Reset()"/>
Now. on each page I have js scripts to check for errors. If a certain field is incorrect, I change the color of that value to red. I also increment a counter at that point. At the end of the page what I want to do is see if the count of the red values > 0 then stop submission. I cannot use onsubmit="myfunction()" on each page because the frame has the form.submit (see above).
So lies the problem. When I click on Submit in the lower frame, the function to validate the current page is never executed because the lower frame has the: parent.Page1.document.FormSubmit.submit();
1. Is there a way within in the submit function in the parent to check the count?
2. Is there a way to stop submission within the frame if the count > 0?
thank you very much