Robert Granlund
asked on
jQuery
I have a jQuery on Change function. I need to make it into a onChange or on Submit Function. I need both, How do I write that?
<script>
$(document).ready(function () {
$('select').change(function () {
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi,
I created a really small sample here
http://jsfiddle.net/EE_RainerJ/nvvu5mc8/
I prefer to use the "on" handler - but thats the only difference.
Could you perhaps add more info about your scripts?
HTH
Rainer
I created a really small sample here
http://jsfiddle.net/EE_RainerJ/nvvu5mc8/
I prefer to use the "on" handler - but thats the only difference.
Could you perhaps add more info about your scripts?
HTH
Rainer
just attach it to an onchange event handler, and within that code, do a form submit on whatever conditions warrant it:
$('select').change(function () {
if ( this.val() == 4 )
$(form).submit();
else
.....
}
ASKER
I wrote earlier that it did not work. I looked everything over and I had a spelling error. Sorry for making you post twice. Thanks for your help!
ASKER