Skip to Content

How to Disable all InputFields (aka TextFields)?

Hi,

I'm trying to disable all inputfields on the screen.

But I want to do it the dynamic way - not the hard coded way.

Currently I am stuck - I tried a lot of stuff already but nothing worked.

This is the actual approach I am using in the controller of the main page - in the debugger I can see the objects but nothing happens when I change the Objects:

$("input").each(function( index ) {  
  console.log( index + ": " + $(this).defaultValue );    
  $(this).readOnly = true;  
  });

Any help is appreciated.

Thanks & regards

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jan 03, 2015 at 04:59 PM

    Solved... Problem was using "$(this)" instead of "this"...

    Add comment
    10|10000 characters needed characters exceeded