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

Adobe Spry and multiple buttons

Status
Not open for further replies.

johnsimpson

Programmer
Mar 28, 2006
60
GB
Hi All,

Im using some of adobe's spry elements for form validation but I have an issue. Basically my form has 2 buttons on it and I only want the form validation to activate on one of the buttons. Does anyone know if this is possible and how i might achieve it?

thanks
John

 
Hi

Is your document looking like the XHR submit and form validation example on Spry's site ?
Code:
<form id="form1" name="form1" method="post" action="SubmitChecker.php" onsubmit="return [red]!check ||[/red] validateonsubmit(this);">

<input type="submit" value="Submit with validation" [red]onclick="check=true"[/red]/>
<input type="submit" value="Submit without validation" [red]onclick="check=false"[/red]/>

</form>

Feherke.
 
not quite... our form is a asp/c# form and the other button is to take the user to an amend details page. the button we want the form to validate from is the submit button but this example may work...

I will speak to our developer and ask him if he can add the onclick to the buttons, i presume we need to add the onsubmit as well?

the problem is the form runs at server, will this cause a problem?

thanks for your quick response
John
 
Hi

John said:
i presume we need to add the onsubmit as well?
Theoretically the [tt]onsubmit[/tt] should be already there if the Spry form validation was implemented.
John said:
the problem is the form runs at server
I suggest to ask more about it in an asp/c# forum. We are doing JavaScript here.

Feherke.
 
ok thanks for your help, I just thought with it being a javascript app it wouldnt harm to ask.

I will have a try with your suggestion and also enquire on a asp/c# forum

thanks again
John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top