| Author |
Message |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 03/21/2008 17:38:48
|
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)
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 03/24/2008 09:50:05
|
adina_mihai
Simplica Team
Joined: 04/01/2007 00:00:00
Messages: 183
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...
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 03/24/2008 10:45:13
|
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.
|
|
|
 |
|
|