Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Thursday February 8 2018 - 06:02:43

calling javascript instead of hyperlink


Poster: fen __at__ changegroup.dk
Dated: Tuesday May 7 2002 - 20:54:26 BST

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

Re: calling javascript instead of hyperlink


Poster: Andy
Dated: Tuesday March 26 2002 - 15:32:12 GMT

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

Re: calling javascript instead of hyperlink


Poster: diokast __at__ hotmail.com
Dated: Wednesday March 27 2002 - 7:06:27 GMT

Thank you very much Andy

this works just fine!