Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Menu, problems with the modal windows
nahiko
Junior Member

Posts: 2
Registered: 10/30/2007
Location: Spain
Member Is Offline
posted on 10/30/2007 at 12:04 PM Reply With Quote
Menu, problems with the modal windows


Hi everyone

I have been using the Tigra Menu for a while, always with non-modal windows, but now, I need to use it in a modal window.

And I have a problem, and it is that, when I set some javascript code in the link of an item of the menu, when I click it, the menu tries to open a new window (because the first one is modal) with the same URL that the code in the link, for example, if the code in the link is

javascript:alert('hi world');

it will try to open a new window with the URL "alert('hi world')" what is kind of weird...

Does anyone have a solution for this? I would need it to execute that code, not to open a new window with that URL :-S

Thanks in advance!! :D

Nahiko
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 10/31/2007 at 12:51 AM Reply With Quote

you can modify the script so <div onclick="..."> used instead of <a href="...">
this should take care of the issue
View User's Profile View All Posts By User U2U Member
nahiko
Junior Member

Posts: 2
Registered: 10/30/2007
Location: Spain
Member Is Offline
posted on 11/9/2007 at 11:21 AM Reply With Quote
Problem solved :D


Hi Tigra!!

Thanx for your answer, I tried that, but it did not work for me because I modified a lot the former tigra.js file and the styles broke when I put a "div" instead of an "a href"

But I got to solve my problem this way:

in the method "menu_onclick(n_id)" I changed what I had, and I put

eval(document.activeElement.href)
event.cancelBubble = true;
window.event.keyCode = 0;
window.event.returnValue = false;
return true;

So the link code gets "evaled" and not clicked because the event click is cancel as well as the bubble cancelled. Fortunatelly, the onclick executes before the href :D
And even being a modal window, if I eval the link it does not open a new window :D

Maybe this can also solve some problems to someone else !!

Even changing the code, the line "// URL: http://www.softcomplex.com/products/tigra_menu/" is still in the file ;-)

Greetings and thanks a lot!!

Nahiko!!
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page Tigra Menu
Product Demonstrations Live Demos:
Traditional Blue
White Steps
Inner HTML
All Together
Frames Targeting
Free Download Free Download
Free Download Menu Builders
Online Builder
Builder for Windows
Product Documentation Documentation:
Documenation Page
Change Log
Menus Comparison Table
Support Forum Support Forum
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004