Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to Disable all InputFields (aka TextFields)?


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


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

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question