Jump to content

help in Javascript and HTML


sidv9

Recommended Posts

hello guys,

i am trying to create a page with two radiobutton and two checkboxes. the functionality is, the checkbox must automatically be checked if the corresposding radiobutton is clicked. also while the radiobutton is checked, one must NOT be able to uncheck the checkbox. finally, when a different radiobutton is clicked, then the previously clicked checkbok must be released ( unchecked). i am not able to get the final functionality

help is greatly appreciated

thanks

<input type = "checkbox" id="box_<%= colorSet.getDisplayName() %>" name = "checkboxName" onclick = "colorCall()"/><input type = "radio" id="radio_<%= colorSet.getDisplayName()   %>" name = "radioGroupName"   
                             onclick = "$('box_<%= colorSet.getDisplayName() %>').checked = true;  
                              if($('radio_<%= colorSet.getDisplayName() %>').checked = true) {$('box_<%= colorSet.getDisplayName() %>').disabled = 'disabled'}  
                              else if($('radio_<%= colorSet.getDisplayName() %>').checked = false) { $('box_<%= colorSet.getDisplayName() %>').enabled = 'true'};" } /> 

where $ is nothing but Document.getElementByID()
aand the colort.getDisplay whatever is nothing but the database name of the checkbox in a for:each loop

Link to comment
Share on other sites

  • 2 weeks later...
Guest rakesh35791

onclick = "colorCall()" ani code lo rasavu kada..

kaani colorcall() ane function ni ekkada declare chesavu.. function code kooda pettu... so that i can try to look at it..

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...