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(){
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
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.
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
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:
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
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
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
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,
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
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
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();
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() {
13 matches
Mail list logo