Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Issue with checkbox inside anchor tag

Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 67445
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why is the checkbox inside an anchor? And remove the unnecessary "javascript:" prefix.
Sunglasses. AKA Coolness prosthetic. This tiny ad doesn't need shades:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic