Re: jqery not getting called after ajax refresh

2010-05-04 Thread fachhoch
I got a new problem with this. The browser loses focus. Please suggest what I can do to retain focus at selected element. here again my jquery $(document).ready(function(){

Re: jqery not getting called after ajax refresh

2010-05-04 Thread Jeremy Thomerson
if this is happening in an ajax request, you can use AjaxRequestTarget.focusComponent(foo); -- Jeremy Thomerson http://www.wickettraining.com On Tue, May 4, 2010 at 11:24 AM, fachhoch fachh...@gmail.com wrote: I got a new problem with this. The browser loses focus. Please suggest what

Re: jqery not getting called after ajax refresh

2010-05-04 Thread fachhoch
No this is not in ajaxrequest. It is just jquery. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/jqery-not-getting-called-after-ajax-refresh-tp1872270p2126099.html Sent from the Wicket - User mailing list archive at Nabble.com.

Re: jqery not getting called after ajax refresh

2010-05-04 Thread robert.mcguinness
print out some unique attribute of the element that last regains focus to console.debug, maybe http://api.jquery.com/focusin/ will help. - roberto -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/jqery-not-getting-called-after-ajax-refresh-tp1872270p2126168.html

Re: jqery not getting called after ajax refresh

2010-04-15 Thread fachhoch
My link is a static html link its not ajax link ,and this link resides in AjaxFallbackDefaultDataTable , the repaint of this table containing is handled by AjaxFallbackDefaultDataTable. Please tell me how can I add the java script in this case ? -- View this message in context:

Re: jqery not getting called after ajax refresh

2010-04-15 Thread robert.mcguinness
have you tried using jQuery 1.4 live/delegate handlers? they will attach events to elements even after initial dom load. -- View this message in context: http://n4.nabble.com/jqery-not-getting-called-after-ajax-refresh-tp1872270p1896790.html Sent from the Wicket - User mailing list archive

Re: jqery not getting called after ajax refresh

2010-04-15 Thread fachhoch
No , please tell more on usingjQuery 1.4 live/delegate, you have any example ? ok one more easy solution may be if I add the function in onclick attribute of the link , but I dont know to write jquery function in onclick attribute , please tell me how can I write the jquery function in

Re: jqery not getting called after ajax refresh

2010-04-15 Thread robert.mcguinness
hopefully this helps: We can bind a simple click handler to this element: $('.clickme').bind('click', function() { // Bound handler called. }); When the element is clicked, the handler is called. However, suppose that after this, another element is added: $('body').append('lt;div

Re: jqery not getting called after ajax refresh

2010-04-15 Thread fachhoch
It works thanks . -- View this message in context: http://n4.nabble.com/jqery-not-getting-called-after-ajax-refresh-tp1872270p1908182.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe,

Re: jqery not getting called after ajax refresh

2010-04-09 Thread Jeremy Thomerson
That's because your JS is only adding the onclick handler when the document is ready. Later, when you replace those links that you added the onclick handler to, they are replaced, and therefore no longer have the old onclick handlers. You will need to trigger the addition of your onclick handler

RE: jqery not getting called after ajax refresh

2010-04-09 Thread Russell Morrisey
It might be a good idea to use an IBehavior to contribute the script. You can add the behavior to the link component in wicket; when the behavior is rendered, it can contribute the javascript code to set it up with jquery. That way, you ensure that every new rendering of the link (which creates

Re: jqery not getting called after ajax refresh

2010-04-09 Thread Ben Tilford
Try function setup() { $(a.showHidePrograms).click( function () { var $div= $(this).parent().next(div); if($div.attr(class) == 'hide'){ $div.attr(class,show); }else{ $div.attr(class,hide); } } ); } $(document).ready(function(){ setup();

Re: jqery not getting called after ajax refresh

2010-04-09 Thread Jeremy Thomerson
Yes - this is the exact way to do it so that you don't have to duplicate the script on each request. Thanks for the great post! -- Jeremy Thomerson http://www.wickettraining.com On Fri, Apr 9, 2010 at 6:07 PM, Ben Tilford bentilf...@gmail.com wrote: Try function setup() {