|
Dynamic Script Control
WebShow provides 4 public methods accessible via JavaScript. To use these methods, the <applet> tag must include the empty mayscript attribute and a name= attribute that gives the applet an identifiable object-name within the browser. In the examples below, we've assumed the name has been set to 'webshow' (using name="webshow").
showHTML(htmlcode)
<a href="javascript:void document.webshow.showHTML('<H1>Hello!</H1>')">show(url) Provides a way to pass an absolute or relative URL of an HTML page into WebShow. The usual Java security requires that this be a page that resides on the same server as the applet itself. This allows a designer to place links on a page that target WebShow using a construction like this: <a href="javascript:void document.webshow.show('mypage.htm')">My Page</a>back() WebShow maintains a 'history list' of the URLs of pages it has displayed itself during the session. A call to the back() method forces WebShow to reopen the previous document in the history list if there is one. This method returns a boolean value according to whether any further calls to back() are possible (i.e. whether it's possible to step back any further after opening this document). There is no corresponding 'forward' method. Rather than accessing the history list using JavaScript, you can include a link in your page like this: <A HREF="webshow.back()">Back to previous page</A>When the user clicks this link, WebShow will reload the last-viewed page (if there is one).
backEnabled()
|