View Full Version : Need some help with popup script please.

09-27-2007, 07:17 AM
1) Script Title: Popup Window Generator

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex8/popwin.htm

3) Describe problem:


Can someone please help me out with this popup script.
Why I can"t test the script (below) offline, or is it normal that it works only online?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language="javascript" type="text/javascript">
Author: Eric King
Url: http://redrival.com/eak/index.shtml
This script is free to use as long as this info is left in
Featured on Dynamic Drive script library (http://www.dynamicdrive.com)
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,re sizable=no';
// -->

<a href="http://www.google.com" onclick="NewWindow(this.href,'mywin','400','300','no','center');return false" onfocus="this.blur()">YourLinkText</a>


09-27-2007, 08:34 AM
The script you've provided working correctly for me in both MS IE and Mozilla FF without any problem. Just open the page in your browser and click the link and that will open a popup window.

If you are getting any error or messages please post that things here or mention a URL of the page in your posting.

09-27-2007, 11:31 AM
Thanks for the quick reply.
The script was working fine but I couldn't test it offline which is now working again, don"t ask me why that is.
I just thought that I was doing something wrong with the script.

Thanks again,