This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Issue with checkbox inside anchor tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Issue with checkbox inside anchor tag" Watch "Issue with checkbox inside anchor tag" New topic
Author

Issue with checkbox inside anchor tag

prathima krishna
Greenhorn

Joined: Jun 22, 2010
Posts: 3
Hi ,

I have 3 tabs and inside each tab there a checkbox and Onclick of the tab or the chekbox i need to display the corresponding contents..

As of now i am able to display the contents on click of the tab but the onclick is not working in case of checkbox.

this is the code for a checkbox inside a tab

<li><a href="#" rel="dog2">Tab 2<span><input type="checkbox" onclick="javascript:checkTab(this.form);" id="chk2"></span></a></li>


Can some one please help me out with this issue
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60794
    
  65

Why is the checkbox inside an anchor? And remove the unnecessary "javascript:" prefix.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
Don't get me started about those stupid light bulbs.
 
subject: Issue with checkbox inside anchor tag
 
Similar Threads
.do url problems
Jquery Wrong Markup
Javascript, h:panelGroup
Passing Parameters between the tabs in single JSP
Failing to validate using ditchnet tabs