|
PopUp windows are pretty easy to accomplish using JavaScript in NetObjects Fusion - there are two approaches to it:
- Pop-Up Window using Scripting in the “Layout HTML” Window
* Click Here for a sample pop-up window using this method *
- Pop-Up Window using Scripting in the Link Window
* Click Here for a sample pop-up window using this method *
... and which one you use is entirely up to you. Method 1 can have some problems in Frames-using pages, while Method 2 works well in both cases.
Scripting in the “Layout HTML” Window
The “Layout HTML” window is also known as “Layout Script” in NOF 2.0, by the way...
- Right-Click (Control-Click if you’re on a Mac) in the Layout area of your Page in Page View and select “Layout HTML”
- In the “Between Head Tags” field (aka “Inside Head Tag” in 2.0), type in the following code:
<script language = "JavaScript"> <!-- Hide from non-JavaScript aware browsers function Go() { myWindow =window.open("./html/whatever.html","NewWindow", "toolbar=0,location=0,directories=0,status=0, menubar=0,scrollbars=0,copyhistory=0,width=???, height=???"); myWindow.location = "./html/whatever.html"; }
function fetch(url) { rootWin.location = url; } // End Hiding --> </script> |
|
|
Where ./html/whatever.html is the URL for the page you wish to have appear in the pop-up window, NewWindow is the text you want to have appear in the Title bar of the new window, and the width and height are set appropriately. You can toggle any of the Window options (toolbar, location, directories etc etc) on with 1 or yes as the value, and off with 0 or no as the value. If you leave off the Window options, most browsers will default these values to “no”
|
Note: If you’re setting up your target page in NetObjects Fusion, you may want to increase the height and width settings by about 20 pixels
|
|
|
- Create the text or image you wish to set up as the link and click on the “Link” button in the Properties window
- Select the “External Link” tab and select “javascript” from the drop-down protocal window
- Type in the following code into the URL field to the right of the drop-down protocal window
... that’s it.
Scripting in the Link Window
Scripting in the Link Window is a shorter method and takes advantage of the LinkHTML feature.
- Create a text or image object and click on the Link button
- Click on the “Smart Link” tab and select the “Blank” Smart Link
- Click on the “HTML” button in the bottom left corner of the Link window
- Select the ”Inside Tag” tab, and type in the following code
onclick="window.open('./whatever.html', 'WindowName','toolbar=0,location=0,directories=0, status=0,menubar=0,scrollbars=0,resizable=0, copyhistory=0,width=???,height=???')" |
|
|
as one line without carraige returns, where ./whatever.html is the URL you are linking to, WindowName is the text you want to have appear in the “Title” bar of the window and height and width are set to the height and width of the page you are linking to.
- .Click “Link”.
|