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 numeric parm

Pass numeric parm

Postby dbirley on Wed Mar 05, 2008 9:22 pm

I have invested in JavaScript for Dummies (after first investing in Java for Dummies -- learning curve v 1.0).

25 years' of xBase and VFP programming behind me, so I know what I want -- just can't seem to find out how to get it <g>!

Borrowing a bit of code from JS4D (page 147):

<HTML>
<HEAD><TITLE>Opening multiple windows(from JavaScript For Dummies, 4th edition)</TITLE>

<SCRIPT LANGUAGE="JavaScript">

var newWindow = null;

function popItUp(win) {
var windowFile = win + ".htm"
newWindow = open(windowFile, win, "scrollbars,resizable,width=500,height=400");
}

</SCRIPT>

</HEAD>
<BODY>

<H2>Opening multiple browser windows is easy when you use a function that takes a parameter.</H2>
<FORM>
<INPUT TYPE="button" VALUE="Open window #1" onClick="popItUp('one')">
<INPUT TYPE="button" VALUE="Open window #2" onClick="popItUp('two')">
<INPUT TYPE="button" VALUE="Open window #3" onClick="popItUp('three')">
</FORM>
</BODY>
</HTML>

What I want to do is pass a pair of numeric parms to the popItUp function with which to set the top and the left values. These would be different for each window.

Once I understand the principle, I think I can do what I
really want :roll:
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