aspose file tools*
The moose likes Struts and the fly likes How to access the Struts HTML elements in JS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to access the Struts HTML elements in JS" Watch "How to access the Struts HTML elements in JS" New topic
Author

How to access the Struts HTML elements in JS

Siva Arun
Greenhorn

Joined: Feb 23, 2010
Posts: 28
Hi All,

I just want to set the read only property to false when clicking some button. Could you please help to access this element in the javascript?



"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61232
    
  66

There's no such thing as a "Struts element". All those tags do is to generate "normal" HTML. So just look at what HTML is being generated and deal with that from script like any other HTML elements.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

What he said, but you might want to use the "styleId" attribute to make things easier.
Siva Arun
Greenhorn

Joined: Feb 23, 2010
Posts: 28
Thanks All. It works fine now.
 
wood burning stoves
 
subject: How to access the Struts HTML elements in JS