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: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:27

Javascript new window


Poster: dmj120
Dated: Wednesday May 26 2004 - 22:08:06 BST

After my 'targetfeatures attributes' topic, I used a js function.
Code:
aI("text=link name;url=javascript:openNewWindow('http://www.theurl.com');");

Which works .... kinda... if the mouse is in the box but NOT on the text, the status bar reads Shortcut to javascript:openNewWindow('http://www.theurl.com') and works great

However ....

if the mouse goes ON the text, the status bar reads Shortcut to javascript:openNewWindow(

and then a syntax error is generated
:?:
Any ideas why the text itself is not a good link... but the surrounding area is??

Thanks
Josh


Poster: kevin3442
Dated: Wednesday May 26 2004 - 23:25:41 BST

Hi Josh,

Open your milonic_src.js file and look at the version number in the comments at the top. What version are you running?

Kevin


Poster: dmj120
Dated: Wednesday May 26 2004 - 23:28:25 BST

Version 5.19


Poster: kevin3442
Dated: Wednesday May 26 2004 - 23:31:44 BST

Two more questions:

Is the line of code you posted exactly as it appears in your menu_data.js file?

What browser/OS are you using to test?

Kevin


Poster: dmj120
Dated: Wednesday May 26 2004 - 23:35:42 BST

windows XP / IE ver 6.0 and 5.5

the code is exact except for the "www.theurl.com" I just substituted because it was easier for me to type, but the rest is correct

Josh


Poster: kevin3442
Dated: Wednesday May 26 2004 - 23:43:19 BST

Hmmmm.... that should work. I'm trying it here w/ v5.19 (5.20a is now out BTW) and it works fine.

I don't know if we've asked you already, but can you post a url to your test site/page? If not, can you please post the entire contents of your menu_data.js file, as well as the html file for the page? Please put each one inside of [code][/code] tags.

Kevin

P.S. I gotta blaze now, but I'll be back tomorrow morning.


Poster: kevin3442
Dated: Wednesday May 26 2004 - 23:44:21 BST

One quick thing you could try: use an escaped double quote (\") instead of a single. Although a single should work.

Kevin


Poster: dmj120
Dated: Thursday May 27 2004 - 2:07:22 BST

:lol: :D :!:
Kevin you are the MAN!!!!!

The escaped double quote is all it took!!!

I knew it had to be something simple like that, :oops:

This is why I recommend the 'Milonic menu'.
Thanks again :D
Josh


Poster: dmj120
Dated: Thursday May 27 2004 - 2:10:23 BST

the code now reads:
Code:
aI("text=link name;url=javascript:openNewWindow(\"http://www.theurl.com\");");


Thanks again, works GREAT!!