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

Call function on submit

Status
Not open for further replies.

Bobs390

Technical User
Aug 4, 2004
13
GB
Hi,

Basically I have 2 frames called middle and bottom the middle frame holds a form and the bottom frame holds a javascript form submit buttom.

Code:
<a href="javascript:parent.middle.document.faultform.submit()">Submit</a>

If I click on this it submits the form fine, however there is a javascript error checking procedure called validform() written into the middle page that is normally called when the submit button is on the same frame:

Code:
<form name=faultform onSubmit="return validform();" action="next_page.asp" method="post">

However whrn the js submit button is clicked in the bottom frame the validate() function isn't called, it just submits.

So my question is how can I keep the submit button in the seperate frame but call the function in the other frame as the for is submitted?
 
as this is the ASP forum and your question is about javascript wouldn't it make more sense to post in forum216 ?



Chris.

Indifference will be the downfall of mankind, but who cares?
A website that proves the cobblers kids adage.
Nightclub counting systems

So long, and thanks for all the fish.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top