Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JSP
Search Coderanch
Advance search
Google search
Register / Login
Win a copy of
Eclipse Collections Categorically: Level up your programming game
this week in the
Open Source Projects
forum!
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Ron McLeod
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Saloon Keepers:
Tim Holloway
Roland Mueller
Bartenders:
Forum:
JSP
Jsp calls javascript
anvi kon
Ranch Hand
Posts: 148
posted 5 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I am try to create a checkbox and onlick event. It is not firing properly for unchecked
here is my code
<td><c:if test="1"> <input type="checkbox" name="xx" id="xx" value="1" checked="checked" onclick="selectBasicEconomy('1')" /> </c:if> <c:if test="0"> <input type="checkbox" name="xx" id="xx" value="0" onclick="selectBasicEconomy('0')" /> </c:if></td>
Javascript code
function selectBasicEconomy(strval) { if (strval == '1') { if(document.getElementById('xx').checked) { document.getElementById('xx').checked = false; document.getElementById(xx).value = "0"; } } else { document.getElementById('xx').checked = true; document.getElementById('xx').value = "1"; }
Tim Moores
Bartender
Posts: 7645
178
posted 5 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
JSP
is executed on the server, so it is irrelevant to what's happening in the browser. Post the HTML that is generated.
anvi kon
Ranch Hand
Posts: 148
posted 5 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Onclick event is not firing properly when we call the JavaScript
Dave Tolls
Rancher
Posts: 4801
50
posted 5 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
What does "not firing properly" mean?
Is it executing at all (have you debugged it) when the user clicks on it?
Tim Moores
Bartender
Posts: 7645
178
posted 5 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Tim Moores wrote:
Post the HTML that is generated.
CAUTION! Do not touch the blades on your neck propeller while they are active. Tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
check boxes retrieving problem
Pressing the enter key receive extra invalid data
checkbox must always be checkd
toggle checkbox group when the max limit is reached
how to disable if one or more check boxes selected
More...