Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Prevent other script from enabling a control

    I'v got something challenging... is there anyway i can prevent a conrol from being enabled on PageLoad even if there is a javascript ctrl.enable(); or ctrl.disabled = false; called for it? I have a feeling there isnt such a thing but i thought i'd try my luck with you guys...

    Im implementing security on a page with a module that executes at runtime and disables certain controls on the page. However i dont want any of the other javascripts on the page to be able to re-enable these controls when they are called.

    ZiggY.

  • #2
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,505
    Thanks
    3
    Thanked 501 Times in 488 Posts
    ctrl.parentNode.removeChild(ctrl);
    Vic

    God Loves You and will never love you less.

    http://www.vicsjavascripts.org/Home.htm

    If my post has been useful please donate to http://www.operationsmile.org.uk/

  • #3
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    I personally would say do not include functionality that should not be there. If a user will never be able to use a button, do not show it. It is too easy for someone to use the address bar with a little JavaScript and enable a button.

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •