Within an onClick, is it possible to run many Javascript commands? I have... <A HREF="#ABC" onClick="javascript:window.open('http://pest/SP/VG?PID=PO_MTD_Desc.html','MetricLocation2', 'scrollbars=no,menubar=no,width=400,height=100')"> This helps me get a pop-up window...but I woudl like to ensure it gets the focus, such as when it has been minimized. I know that if I did newWindow = window.open(... and newWindow.focus() that this would work, ut I am not sure how to fit this into the submit onclick.
You can also put multiple javascript commands into an HTML element by using ';' to separate them, like this:
but I prefrer Frank's solution, as it makes for more readable script. [This message has been edited by Bodie Minster (edited May 09, 2001).]
Judy Herilla
Ranch Hand
Joined: Jan 05, 2001
Posts: 89
posted
0
Bodie, I had found your solution before I read both of your responses. I like it because the portal framework I am using is tricky with scripts, and using the semicolon is simple and straightforward! Thanks to both of you!!
Of course, the other thing you can do is have the onClick call a function which in turn acts like a controller and calls multiple action functions. ------------------ I'm a soldier in the NetScape Wars... Joel
Wait a minute, I'm trying to think of something clever to say...<p>Joel
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: Multiple Javascript commands form onClick