Javascript new window

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
dmj120
Advanced
Advanced
Posts: 17
Joined: Sat Jan 17, 2004 11:48 pm

Javascript new window

Post by dmj120 »

After my 'targetfeatures attributes' topic, I used a js function.

Code: Select all

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
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

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
dmj120
Advanced
Advanced
Posts: 17
Joined: Sat Jan 17, 2004 11:48 pm

Post by dmj120 »

Version 5.19
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

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
dmj120
Advanced
Advanced
Posts: 17
Joined: Sat Jan 17, 2004 11:48 pm

Post by dmj120 »

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
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

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.
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

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

Kevin
dmj120
Advanced
Advanced
Posts: 17
Joined: Sat Jan 17, 2004 11:48 pm

Post by dmj120 »

: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
dmj120
Advanced
Advanced
Posts: 17
Joined: Sat Jan 17, 2004 11:48 pm

Post by dmj120 »

the code now reads:

Code: Select all

aI("text=link name;url=javascript:openNewWindow(\"http://www.theurl.com\");");
Thanks again, works GREAT!!
Post Reply