Board Logo

Show animated gif when menu option is clicked
fexposito - 8/9/2007 at 12:29 PM

Hi!

I'm trying to show an animated gif when any option of the menu is clicked, and before the request is sent. So, I have to capture the onclick event before the menu. I tried running the function from the url ("javascript:showloadingdiv();") and the gif is shown, but is not moving. I also tried surround the caption whith "<span onclick='showloadingdiv()'></span>" but this isn't working at all.

Is there any way of solving this?

Thanks in advance.


tigra - 8/9/2007 at 03:03 PM

The content of the menu item doesn't receive mouse events.
In your case I suggest using the feature that allows different HTML for different states of the menu item (normal, hower, down). In the HTML for mousedown state replace the name of the image with one that's animated.

see http://www.softcomplex.com/products/tigra_menu_gold/docs/#items_caption


fexposito - 8/10/2007 at 10:16 AM

Quote:
Originally posted by tigra
The content of the menu item doesn't receive mouse events.
In your case I suggest using the feature that allows different HTML for different states of the menu item (normal, hower, down). In the HTML for mousedown state replace the name of the image with one that's animated.

see http://www.softcomplex.com/products/tigra_menu_gold/docs/#items_caption


Thanks for your reply. The image is outside the menu. What I like to show is a div (hidden until submit) with an animated image in the middle of the page and the text "Loading page" when any option of the menu is clicked. Is there any way of doing this?

Thanks!


tigra - 8/16/2007 at 05:56 PM

you can call your own javascript function from the menu items. as a parameter you can pass the URL of the page you want to redirect browser to after updating the animated image.

http://www.softcomplex.com/products/tigra_menu_gold/docs/#items_link


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/