Can't hide checkbox javascript

6 posts, 0 answers
  1. ataya
    ataya avatar
    11 posts
    Member since:
    Aug 2006

    Posted 08 Apr 2009 Link to this post

    I have a two radio buttons and checkbox that when one of the radio buttons is selected the the check box should be unchecked and hidden..

    I have tried this 

    //hide: 0 or 1 to determine hide or show action 
    function HideShowTakeMeThere(chk_TakeMeThere,lbl_TakeMeThere, hide) 
    1 {   
    2 var chk = document.getElementById(chk_TakeMeThere);  
    3 var lbl = document.getElementById(lbl_TakeMeThere);  
    4 chk.style.visibility = lbl.style.visibility = hide == 1 ? "hidden" : "visible";  
    5


    which work great until I added form decorator .. now it doesn't work at all 
    so I tried as well but not working also  
     chk.style.display = 'none'

    any ideas?
    thank you
  2. Martin
    Admin
    Martin avatar
    585 posts

    Posted 09 Apr 2009 Link to this post

    Hi ataya,

    I already answered to your question in the other ticket you've sent.

    Greetings,
    Martin Ivanov
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Matthew
    Matthew avatar
    33 posts
    Member since:
    Aug 2008

    Posted 01 May 2009 Link to this post

    Martin,

    Do you mind posting the response here, too?

    Matthew
  5. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 04 May 2009 Link to this post

    Hi Matthew,

    You can find below Martin's reply


    Please, find attached the script that toggles skinned checkboxes via radiobuttons as toggles their checked state via JavaScript. In short - when we skin the controls, we hide the real control, and make use of its label, by attaching it checked or unchecked CSS classes. I have added comments in the script of what is what, and I believe you will be able to further develop the script, if you need to add more functionality.

    Kind regards,
    Martin Ivanov




    Sincerely yours,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Richard
    Richard avatar
    23 posts
    Member since:
    Jun 2009

    Posted 15 Oct 2009 Link to this post

    Could Telerik include a javascript helper functions that would enable / hide / etc skinned controls. The functions should work with non-skinned controls as well.
  7. Martin
    Admin
    Martin avatar
    585 posts

    Posted 16 Oct 2009 Link to this post

    Hello Richard,

    The functionality you have requested has been a topic of a ongoing discussion in Telerik, however we still are still not unannimous on the methods we should implement - probably there should be a toggle checked / unchecked and toggle disabled / enabled methods but it is unlikely that we implement a toggle visibility to the controls, as this is not a functionality that the real controls have.

    Have a great weekend,
    Martin Ivanov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017