This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Re-Execute Javascript on Ajax Render

 
Dominik Müller
Ranch Hand
Posts: 36
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi There,

the problem is that it seems that on an ajax rerender of an partial area of the webpage, the containing javascript code doesn't get called again.
Is there any chance to re-execute the javascript code contained in an partial response?

Dummy Example


Ajax Call > ReRender the Formular (works) > Javascript Code doens't get called again

Somebody an idea?
Thanks a lot
Dom
 
Cesar Loachamin
Ranch Hand
Posts: 90
Chrome Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dominik

You're right the javascript code doesn't call beacuase you're making a partial request and the responso only contain the tags for the components specified in the render attribute of the f:ajax tag.
I have an idea if you always wants to run a javascript function when you make the partial request you can use the javascript event onevent of the f:ajax tag, this funtion is fired tree times throughout the lifetime of an Ajax call: begin, complete, success. I give an example:

Regards
Cesar
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic