It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

Pass params to popup

Pass params to popup

Postby dbirley on Fri Mar 14, 2008 8:37 pm

Okay -- I'm back with my parm passing obsession. What I want to do is create a popup that will be the "receiving container". It will display with these components:

Header 1
Header 2
Text 1
Text 2
Image

Additionally the top and left positions need to be changeable.

If I were programming in Visual FoxPro (25 yrs experience) I would expect to build the content of each of these components into individual variables, and then pass them to a function:

var newWindow = null;
var head1 = "Hello"
var head2 = "World"
var text1 = "This is the first paragraph"
var text2 = "This is the second paragraph"
var myImage = "yadda.jpg"
var myLeft = 200
var myTop = 300

...and then call the popup thus:

function popItUp(win,head1,head2,text1,text2,myImage,myLeft,myTop) {
var windowFile = win + ".htm"
newWindow = open(windowFile, win, head1 ... etc. "scrollbars,resizable,width=500,height=400");
}

So -- quite simply how do I do it? (Function popItUp was adapted from Java Script for Dummies, p. 147).
dbirley
 
Posts: 3
Joined: Wed Mar 05, 2008 8:19 pm
Location: Rock Hill, SC

Who is online

Users browsing this forum: No registered users and 2 guests