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
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
Ron McLeod
Tim Cooke
Liutauras Vilda
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Rob Spoor
Junilu Lacar
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Piet Souris
Carey Brown
Bartenders:
Forum:
JSP
Jsp calls javascript
anvi kon
Ranch Hand
Posts: 148
posted 2 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: 7488
171
posted 2 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 2 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 2 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: 7488
171
posted 2 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Tim Moores wrote:
Post the HTML that is generated.
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...