Javascript Error

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
User avatar
bobwill
Mega Advanced
Mega Advanced
Posts: 229
Joined: Tue Oct 01, 2002 3:03 pm
Location: Kansas
Contact:

Javascript Error

Post by bobwill »

Running Version 5 RC 42

I have had the following line of code in my data file for many months. It no longers works in Opera 6, but works in Opera 7 and IE 6.
The javascript "openNewWindow" is loaded just like the Milonic files.

When the call is made using Opera 6 I get error message window that says "Internal Communication Error". Is this Sun Java Runtime Environment problem or a Milonic syntax problem??

http://www.baseball.legion.org

aI("text=News;url=javascript:openNewWindow(\"/news.htm\",310,350,\"scrollbars=yes\");oncolor=black;offcolor=white;offbgcolor=red;status=PopUp News;separatorsize=1;");
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Hey stranger! Where've you been hiding?

Can't answer your question about where the problem lies, but you might want to try having the menu open the window for you (it's grown up!). See http://milonic.com/menusample.php?sampleid=11. Note that we now provide complete control over the new window (height, width, scrollbars, etc.).

Let us know if that works.

BTW, RC43 is up.
John
User avatar
bobwill
Mega Advanced
Mega Advanced
Posts: 229
Joined: Tue Oct 01, 2002 3:03 pm
Location: Kansas
Contact:

Post by bobwill »

OK, I will take a look at example. I have been keeping busy just going form RC to RC.

I look at many of the questions about the menu and try to get new ideas. I am glad it you that has to answer the same question over and over. I wonder what the #1 question that you see over and over?? I would bet, it would be "How do I get rid of Milonic menu link", and your favorite answer is "What is your URL"

My menu seems to be pretty simple compared to some that I see. I like it that way.

Thanks for your help.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

bobwill wrote:I look at many of the questions about the menu and try to get new ideas. I am glad it you that has to answer the same question over and over. I wonder what the #1 question that you see over and over?? I would bet, it would be "How do I get rid of Milonic menu link", and your favorite answer is "What is your URL"
There is definitely a lot of the same thing over and over. You hit two of the 'biggies'.
bobwill wrote:My menu seems to be pretty simple compared to some that I see. I like it that way.
Mine are, too. But Andy has built some incredible capabilities into this thing, and some folks are taking advantage of that and turning out some really great stuff. For this ancient mind, however - K.I.S.S.!
bobwill wrote:Thanks for your help.
Any time.
John
User avatar
bobwill
Mega Advanced
Mega Advanced
Posts: 229
Joined: Tue Oct 01, 2002 3:03 pm
Location: Kansas
Contact:

Post by bobwill »

I changed the line of code to
aI("text=News;url=/news.htm;target=windowname;targetfeatures=width=310 height=350 scrollbars=yes status=yes");

and uploaded to server. Still does not correctly in Opera 6. It does pop up new window, but ignores size. It opens into a new "blank" window, then when I kill window the menu is no longer on orginial page, have to reload browser.

Also, where do you add the commands oncolor=black;offcolor=white;offbgcolor=red;status=PopUp
to the above line?
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

bobwill wrote:I changed the line of code to

Code: Select all

aI("text=News;url=/news.htm;target=windowname;targetfeatures=width=310 height=350 scrollbars=yes status=yes");
Not sure how picky the menu is, but you may need to add a missing ; towards the end...

Code: Select all

aI("text=News;url=/news.htm;target=windowname;targetfeatures=width=310 height=350 scrollbars=yes status=yes;");
bobwill wrote:Also, where do you add the commands oncolor=black;offcolor=white;offbgcolor=red;status=PopUp
to the above line?
Anywhere (except in the middle of the targetfeatures, of course!)...

Code: Select all

aI("text=News;url=/news.htm;target=windowname;targetfeatures=width=310 height=350 scrollbars=yes status=yes;oncolor=black;offcolor=white;offbgcolor=red;status=PopUp;");
...as an example.
John
User avatar
bobwill
Mega Advanced
Mega Advanced
Posts: 229
Joined: Tue Oct 01, 2002 3:03 pm
Location: Kansas
Contact:

Post by bobwill »

One last comment.
I now have the following line of code in my data file.

aI("text=News;url=/news.htm;target=windowname;targetfeatures=width=310 height=350 scrollbars=yes status=yes;oncolor=black;offcolor=white;offbgcolor=red;status=PopUp News;separatorsize=1;");


It still does not work in Opera 6. Do not get a popup just a "new" window. Works in Opera 7 and IE 6. Guess I won't worry about it since the information is being displayed, but just not in a "popup window".

I do not know what happen, but it did work when I loaded my own javascript function.

Thanks for the advice and help.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Just for info, I tried Opera 6 and not only doesn't it open a new window but if I resize the browser the menu flat out disappears and I have to reload the page to get it back, and if I try the news link and then click the back button the menu is gone there also....that doesn't happen with the back button on any other links I tried, just that one.

Ruth
User avatar
bobwill
Mega Advanced
Mega Advanced
Posts: 229
Joined: Tue Oct 01, 2002 3:03 pm
Location: Kansas
Contact:

Post by bobwill »

Thanks for taking a look. At first I thought something was wrong with Opera 6 so I reinstalled. No change. However, there is some emulation, interpretation problem between Opera 6 and Opera 7 and Milonic menu code. Maybe some how it will get fixed in another RC.
Post Reply