1) Script Title: Popup Window Generator
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex8/popwin.htm
3) Describe problem: The window pops up OK the first time. But, when you mouseover and the (+) comes up, and you click, the image enlarges. The image is now too large for the frame, so you resize it, and then it starts acting strangely and subsequent (+) or (-) clicks and reposition it within the popup window, never really getting control of it again to view it correctly. Much of the time there is black space around the botton and/or the right side, and if you click in this area, the image goes greyish.
A working test example of the problem can be seen at: http://earth.engr.ccny.cuny.edu/noaa...PopupTest.html
Besides all that, the script generated code, for example:needs to be changed slightly to this:Code:<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){ if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;} if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;} 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,resizable=yes'; win=window.open(mypage,myname,settings);} // --> </script>Because without that, if the popup is minimized and not closed, subsequent calls leave the popup invisible behind the current browser window. (Thanks to jscheuer for this correction in today's forum.)Code:/**************************************************** 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){ var TopPosition var LeftPosition var settings if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;} if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;} 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,resizable=yes'; win=window.open(mypage,myname,settings); win.focus();}



Reply With Quote

Bookmarks