About
Pricing
Community
Teams
Start Free Trial
Log in
JRockFL
asked on
3/5/2011
button click
Are there any differences between "button" and "input" for the click event?
My click event is not firing.
<button id="ctl00_ContentPlaceHold
er1_btnSub
mitOrder" class="btn">
<span></span>Submit Order</button>
$("[id$='_btnSubmitOrder']
").click(f
unction () {
if (validateNotes) {
return true;
}
else {
return false;
}
});
jQuery
4
1
Last Comment
JRockFL
8/22/2022 - Mon
BurnieP
3/5/2011
Hi,
I don't think i've ever use the button control. But with input I would do it like this :
The way I would select a button like you are trying to is :
<input type="button" id="ctl00_ContentPlaceHold
er1_btnSub
mitOrder" class="btn" value="Submit Order"></input>
$("input[id*=_btnSubmitOrd
er]").clic
k(function
() {
if (validateNotes) {
return true;
}
else {
return false;
}
});
JRockFL
3/5/2011
ASKER
This is the first time I'm using the button control and I dont have the option of changing to input.
ASKER CERTIFIED SOLUTION
BurnieP
3/5/2011
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
JRockFL
3/5/2011
ASKER
Cool, that did it!
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
I don't think i've ever use the button control. But with input I would do it like this :
The way I would select a button like you are trying to is :
<input type="button" id="ctl00_ContentPlaceHold
$("input[id*=_btnSubmitOrd
if (validateNotes) {
return true;
}
else {
return false;
}
});