Simplica

ProductsLearnPurchaseSupportDemoDownload
  [Search] Search   [Recent Topics] Recent Topics  
MenuCell setOnclick from Java - Isses with IE 6
Forum Index -> Menu
Author Message
jmoller


Joined: 03/21/2008 17:15:29
Messages: 2
Offline

I'm having problems with MenuCell setOnclick once it gets nested. It works fine under Firefox 2.x, but under IE 6.0 its ignored. I'm asking it to do a window.open. Oddly enough, it works fine if the MenuCell is the first one after the MenuBar.

MenuCell stuff;
stuff = new MenuCell("Do Stuff");
menuBar.getChildren().add(stuff);

--- This works: (only item on line)

MenuCell s1 = new MenuCell("Select xxx");

s1.setOnclick("window.open('./subfromWeb/xxx.html', 'xxx', 'scrollbars=yes, resizable=yes, toolbar=no, menubar=no, width=800, height=450'); return false;");

stuff.getChildren().add(s1);

--- This does not: (sub menu in pull down)

MenuCell opt1 = new MenuCell("Option 1");

MenuCell opt1_1 = new MenuCell("Select yyy"); // there are 8 of these

opt1_1.setOnclick("window.open('./subfromWeb/yyy.html', '1-yyy', 'scrollbars=yes,resizable=yes,width=800,height=450'); return false;");

opt1.getChildren().add(opt1_1); // one for each of the 8

stuff.getChildren().add(opt1);

-- Using: ecruiser-suite-v1.1.5.jar / java 1.5.0_11 / NetBeans 6.0 / GlassFish V 2.0 / Windows XP

I looked at the javacript that is created, and nothing junps out at me.

The 2nd type of MenuCell setup produces no new window - the first one does (just regular HTML pages)

adina_mihai
Simplica Team

Joined: 04/01/2007 00:00:00
Messages: 180
Offline

This is not a menu problem! The problem is here:



The second parameter is window's name, so it can't start with a digit.
Replace '1-yyy' with a string...
jmoller


Joined: 03/21/2008 17:15:29
Messages: 2
Offline

It looks like IE6 also does not like a dash character in that string. I changed these to all alphas and the window.open() is working as expected.
 
Forum Index -> Menu
Go to:   
Powered by JForum 2.1.7 © JForum Team
Home   |  News   |  Contact   |  About   |  License   |  Privacy   |  Documentation
Copyright © 2009 Simplica Corporation. All rights reserved.