Uncheck a check box with javascript
Last Post 07-23-2012 12:22 PM by Ryan Bakerink. 1 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
James DonnellyUser is Offline
wading in the water
wading in the water
Posts:25
Avatar

--
07-22-2012 06:14 PM
    Hi there,

    I was wondering if any one could help me out. I have a checkbox on my form.  

    When the user click the check box I use javascript to do some validation (Check another field is < 1)

    If the value is less than 1. I display and alert box. This is wiring fine.

    I then want to force the check box unchecked again.

    I can't work out what the line in the javascript should be.

    Right now I'm using $(CheckboxShortname) = false.

    Obviously this is wrong/notworking.

    Is this possible/what syntax should I be using.

    Any help as always would be very great fully received.

    Thanks 

    James

    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    07-23-2012 12:22 PM
    Hello James,

    I would start by using a development tool such as FireBug or Viewing the Page source to locate the assigned ID value to this checkbox field. It will be a large string value, that you can then use JavaScript within your conditions to uncheck the box.

    For instance:

    document.getElementById('dnn_ctr2575_DynamicForms_TBR_GUIDd35eebb2-daa5-44b7-be39-3b60f89d0ed2CheckBoxShortFieldName').checked = false;

    Let me know if this helps or if you have any questions.

    Thanks,

    Ryan


    ---
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi