You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Gregor Kaczor <gk...@gmx.de> on 2011/12/13 11:18:08 UTC
Update ajax target on onmouseover, but just once
Hi!
I have a link of which I show only the file name, the href attribute is
empty.
On an onmouseover event I would like to update the link via ajax to show
it completely with href attribute.
To avoid unnecessary load on the server this should happen just once per
link on the page.
If the page gets reloaded the link will be again shown only by name with
emptry href -attribute.
Any ideas?
Gregor
--
How to find files on the Internet? FindFiles.net <http://findfiles.net>!
Re: Update ajax target on onmouseover, but just once
Posted by Martin Grigorov <mg...@apache.org>.
Hi,
You will need to add some JavaScript logic to the button.
For example: if there is attribute with name "data-href" then use it
and don't make the Ajax call, otherwise make the call and save the
returned href in "data-href" to reuse it for the next mouseovers.
See IAjaxCallDecorator.
On Tue, Dec 13, 2011 at 12:18 PM, Gregor Kaczor <gk...@gmx.de> wrote:
> Hi!
>
> I have a link of which I show only the file name, the href attribute is
> empty.
>
> On an onmouseover event I would like to update the link via ajax to show it
> completely with href attribute.
>
> To avoid unnecessary load on the server this should happen just once per
> link on the page.
>
> If the page gets reloaded the link will be again shown only by name with
> emptry href -attribute.
>
> Any ideas?
>
> Gregor
> --
> How to find files on the Internet? FindFiles.net <http://findfiles.net>!
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org