calling javascript instead of hyperlink

Please note that official support for this menu version has now ceased. There are still plenty of users, though, and the forum is still running. Some of our long-time users may be able to help you out.
Post Reply
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Re: calling javascript instead of hyperlink

Post by Andy »

Hi,

You need to change the ' to a \" like this.

,"Contact Us","javascript:newWin(\"contact.htm\",\"title\")",,,1

Your function seems to work fine.

Cheers
Andy
diokast@hotmail.com
Beginner
Beginner
Posts: 1
Joined: Sun May 19, 2002 7:52 pm

Re: calling javascript instead of hyperlink

Post by diokast@hotmail.com »

Thank you very much Andy

this works just fine!
fen@changegroup.dk
Beginner
Beginner
Posts: 5
Joined: Sun May 19, 2002 7:23 pm

calling javascript instead of hyperlink

Post by fen@changegroup.dk »

I've tried to call a function like below

,"Contact Us","javascript:newWin(\'contact.htm\')",,,1

I 've putted it on top in the menu_arrays.js

function newWin(url,title)
{window.open(url, title,
"scrollbars=yes,resizable=no,status=yes,toolbar=no,location=no,width=700,height=465")}

The problem is that the mouseover doesn't work over the menu item (Contact Us) and the mouse pointer remains "I" and it does not turn to hand. All others works fine, if I click on the link the popup window opens like it should be.
When the page loads in IE5.5, I get an "error on page" (statusbar) for a very quick short time.

Is a bug of the DHTML MENU or something I must configure extra on the js?

Waiting your response

Dennis
Post Reply