Click to See Complete Forum and Search --> : Hyperlink Question??


Phill Pafford
10-13-2006, 09:47 AM
Hi all,

I have a hyperlink that runs a javascript popup window which connects to a DB and display some text the I need to update from time to time. This works great!

I also have another hyperlink thats done the same thing, now I know I can merge these 2 javascript popup windows into one, but now I have another hyperlink that goes to a URL.

My question is could I have the hyperlink popup the window, run my 2 javascript functions and also display the URL web page in one popup?

Here are some pics to better understand:

Popup Window #1
http://i96.photobucket.com/albums/l178/phillpafford/popup1.jpg

Popup Window #2
http://i96.photobucket.com/albums/l178/phillpafford/popup2.jpg

URL
http://i96.photobucket.com/albums/l178/phillpafford/read_dir.jpg

What I would like it to look like
http://i96.photobucket.com/albums/l178/phillpafford/popup_New.jpg

toicontien
10-13-2006, 10:42 AM
Easy. Example code:

var pop1, pop2;
function openWindows() {
var windowOpts = 'width=500, height=300';
pop1 = window.open('URL1', '_blank', windowOpts);
pop2 = window.open('URL2', '_blank', windowOpts);
pop1.focus();
return false;
}

<a href="#" onclick="return openWindows();">Click</a>

Phill Pafford
10-13-2006, 02:11 PM
thanks that helps out a lot, but how do I get the third URL in.

something like

pop1 ..
pop2 ...
url ...