How to create a link with a popup window?

Frequently Asked Questions about WYSIWYG Web Builder
Locked
User avatar
Pablo
 
Posts: 21575
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

How to create a link with a popup window?

Post by Pablo »

1) Insert this popup script inside the <HEAD> tag of the page.
Go to Menu->Page->Page HTML and select the 'Between HEAD tags' tab, then copy/paste this code:

Code: Select all

<script language="JavaScript" type="text/javascript">
<!--
function popupwnd(url, tool, menu, loc, scroll, resize, status, left, top, width, height) 
{ 
   OpenWin = this.open(url, "PopupWindow", "toolbar=" + tool + ",menubar=" + menu + ",location=" + loc + ",scrollbars=" + scroll + ",resizable=" + resize + ",status=" + status + ",left=" + left + ",top=" + top + ",width=" + width + ",height=" + height); 
} 
// -->
</script>


This function has the following parameters:
url; Specifies the URL of the link
tool; show or hide the toolbar ('yes' or 'no')
menu; show or hide the menu ('yes' or 'no')
loc; show or hide the addressbar ('yes' or 'no')
resize; allow to resize the window ('yes' or 'no')
scroll; show or hide scrollbars ('yes' or 'no')
status; show or hide statusbar ('yes' or 'no')
left; Specifies the X coordinate of the popup window
top; Specifies the y coordinate of the popup window
width; Specifies the width of the popup window
height; Specifies the height of the popup window

2) To create a popup link from an image link follow these steps
a) Insert the image
b) Select the image and select Menu->Insert->Link
c) Enter this code in the URL field:
javascript:popupwnd('http://www.pablosoftwaresolutions.com','yes','yes','yes','yes','yes','yes' ,'50','100','750','400')"; return true;

3) To create a popup link from a text follow these steps
a) Create a text link. See also: http://www.wysiwygwebbuilder.com/links.html
b) Enter this code in the URL field:
javascript:popupwnd('http://www.pablosoftwaresolutions.com','yes','yes','yes','yes','yes','yes' ,'50','100','750','400')"; return true;
Locked