• Post Reply Bookmark Topic Watch Topic
  • New Topic

s:property id+Javascript

 
Pradeep Adibatla
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to set a value from s:property by taking its id and setting it to a cell of dynamic created row ...

I approached this as follows...





However,it only prints "hi" and there is no second alert ! what is the error here?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<s:property> is a Struts 2 tag, not an HTML tag. Once it's rendered, it's just text--there's no DOM element with an id of "auth".
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when you view the page source that is generated what does



show up as?

That should give you a hint on why it fails.

Eric
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to JSP, as question reflects a fundamental misunderstanding about how JSP works.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65533
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to carefully read this article to understand how JSP works.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!