donalds
07-25-2007, 02:11 PM
Hello All,
I am trying to figure out what the path would be for setting the src attribute from inside a menu. I am able to get it to work from a button but not from inside the menu.
button path is:
parent.main.setSrc('http://www.google.com');
but when I try to use the same path from in the menu it does not work.
My code is:
<canvas width="100%" height="100%">
<include href="extensions/html.lzx"/>
<class name="browser" extends="window" resizable="true" bgcolor="silver">
<simplelayout axis="x"/>
<menubar name="mbar" placement="menubar">
<menu name="file" >File
<menuitem text="Open">
<method event="onclick">
parent.main.setAttribute('src', 'http://www.google.com');
parent.main.setAttribute('visible', true);
</method>
</menuitem>
</menu>
<menu name="presentations">Presentations
<menuitem text="Installing CallAnalyst" />
<menuitem text="Configure CDM" />
<menuitem text="Installing Services" >
<method event="onclick">
parent.main.setAttribute('src', 'http://www.google.com');
this.main.setAttribute('visible', true);
</method>
</menuitem>
</menu>
</menubar>
<button>GO
<method event="onclick">
parent.main.setSrc('http://www.google.com');
parent.main.setAttribute('visible', true);
parent.main.bringToFront();
</method>
</button>
<html name="main" heightoffset="-74" widthoffset="-19" xoffset="7" yoffset="50">
<method event="oninit">
this.bringToFront();
</method>
<method event="oniframe">
Debug.write('oniframe');
</method>
<method event="onsrc" args="s">
Debug.write('onsrc', s);
</method>
<method event="onload">
Debug.write('onload');
</method>
</html>
</class>
<browser width="100%" height="100%"/>
</canvas>
Any help and an explination of how to figure the path would be great!
Donald
I am trying to figure out what the path would be for setting the src attribute from inside a menu. I am able to get it to work from a button but not from inside the menu.
button path is:
parent.main.setSrc('http://www.google.com');
but when I try to use the same path from in the menu it does not work.
My code is:
<canvas width="100%" height="100%">
<include href="extensions/html.lzx"/>
<class name="browser" extends="window" resizable="true" bgcolor="silver">
<simplelayout axis="x"/>
<menubar name="mbar" placement="menubar">
<menu name="file" >File
<menuitem text="Open">
<method event="onclick">
parent.main.setAttribute('src', 'http://www.google.com');
parent.main.setAttribute('visible', true);
</method>
</menuitem>
</menu>
<menu name="presentations">Presentations
<menuitem text="Installing CallAnalyst" />
<menuitem text="Configure CDM" />
<menuitem text="Installing Services" >
<method event="onclick">
parent.main.setAttribute('src', 'http://www.google.com');
this.main.setAttribute('visible', true);
</method>
</menuitem>
</menu>
</menubar>
<button>GO
<method event="onclick">
parent.main.setSrc('http://www.google.com');
parent.main.setAttribute('visible', true);
parent.main.bringToFront();
</method>
</button>
<html name="main" heightoffset="-74" widthoffset="-19" xoffset="7" yoffset="50">
<method event="oninit">
this.bringToFront();
</method>
<method event="oniframe">
Debug.write('oniframe');
</method>
<method event="onsrc" args="s">
Debug.write('onsrc', s);
</method>
<method event="onload">
Debug.write('onload');
</method>
</html>
</class>
<browser width="100%" height="100%"/>
</canvas>
Any help and an explination of how to figure the path would be great!
Donald