Web pages shown in web-panels can also use SOApplication to manipulate the SuperOffice user interface.To to access the SoApplication object within the web panel web page you need to set:
| Copy Code |
---|
soApplication = window.external; |
The web panels in 6.1 have been totally re-written (to work on Vista). In SIX we used a wrapper around the entire IE application, in 6.1 we use the Web Browser control as an OLE client object. SuperOffice is now the controlling application of the browser. This makes scripting easier. A shared instance of the SuperOffice application object is now accessible as the "external" property of the window object.
In SIX you had to write:
| Copy Code |
---|
set so = CreateObject("SuperOffice.Application")
so.CurrentContact.ChangeIdentity
so.Database.OwnerContactId |
In 6.1 you can write:
| Copy Code |
---|
set so = window.external
so.CurrentContact.ChangeIdentity
so.Database.OwnerContactId |
- or –
| Copy Code |
---|
window.external.CurrentContact.ChangeIdentity
window.external.Database.OwnerContactId |
The external object is however only accessible from web pages located in the “intranet zone” and from local urls that are listed in the application table. (This is done to prevent external websites to gain access to the database.)
To make a popup windows (and "open in new window") to be the same session you must set preference to use the internal browser.
Edit -> Preferences -> Functions -> Use SuperOffice SIX browser: == Yes
Example code:
| Copy Code |
---|
"GENERATOR" content= "Microsoft Visual Studio 8.0" /> BrowserTest ToolBar | <>input id="ToolBarCb" type="checkbox" /> | AddressBar | <>input id="AddressBarCb" type="checkbox" /> | StatusBar | <>input id="StatusBarCb" type="checkbox" /> | Height | <>input id="HeightCb" type="checkbox" /> | Width | <>input id="WidthCb" type="checkbox" /> |
<> input id= "Open" type= "button" value= "Open" onclick= "return Open_onclick()" /> <> input id= "Close" type= "button" value= "Close" onclick= "return Close_onclick()" /> <> input id= "External" type= "button" value= "External" onclick= "return External_onclick()" /> <> input id= "Message" type= "button" value= "MB alert" onclick= "JavaScript:alert('This is a message')" /> <> input id= "Button2" type= "button" value= "MB confirm" onclick= "JavaScript:confirm('This is a message')" /> "ExternalResult"> GetExternal = ??? <> object classid= "CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type= "application/x-oleobject" id= "Player"> "url" value= " http://www.microsoft.com/seminar/en/20030425rpcreate/20030425RPCreate_100k.asx" /> "currentPosition" value= "0" /> "enableContextMenu" value= "false" /> "enabled" value= "true" /> "fullScreen" value= "false" /> "mute" value= "true" /> "color: red">ActiveX control failed to load! -- Please check browser security settings. |