dbirley
Joined: 05 Mar 2008 Posts: 3 Location: Rock Hill, SC
|
Posted: Fri Mar 14, 2008 9:37 pm Post subject: Pass params to popup |
|
|
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). |
|