View Full Version : Pop Up window generator

02-22-2005, 06:08 PM
Erik's pop-up window generator

<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;
var w=100:
var h=100;
var pos='center'
var scroll='no'/
function NewWindow(mypage,myname,w,h,scroll,pos){
else if((pos!="center" && pos!="random")||pos==null)
// -->

<SCRIPT LANGUAGE="javascript">

While I may be new to java, I do have experience in programming(back when C was fairly new and assembler was a required skill). Have messed w/ VBA and C++ some now. Logic is logic and syntax is relevant.
By itself, this code is fairly straight forward and in some program like Frontpage or Adobe golive or whatever it'd probably work great.
Here's my prob though.
I'm using a off-site program to build my website. Like any software, it keeps the user from having to "hard code" certain aspects and properties.(i.e. background properties/images, locations of text/images, yah-de yah, just click/build/choose properties)
To import HTML or Java into this enviornment, I have two choices.
Page Properties/Page Header(Body? :confused: ) and type in HTML code(only).
Second, insert a "Literal Componet" to the page itself(HTML or Java).
My goal is to have a button on index.html(which I may have to hardcode as apposed to "their" navigation templates and have tried, works but does not import properties of page Feedback_form.html) and open up a sized feedback form(calling a subroutine?)
The simplest solution would be HTML code that would define size and position of new window. (and then it may not import defined properties of "populate w/ page.html)
Second, I'm not understanding/doing wrong the window.open/onfocus/onopen/self commands.
Third, not understanding the aspect/limitations of "their" literal component.
Fourth, I'll have to hard code the entire thing.
Any suggestions would be greatly appreciated.
P.S. the reason for the vars at the top was a attempt to apply to "self"