Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

window.open help 2

Status
Not open for further replies.

klaforce

Programmer
Mar 25, 2005
124
US
Hi, I have a page with the following code (just a link to popup) which leads to another page. From this popup page I would like to popup another window, but it will not let me, it just treats it like a normal link and moves inside the first popup window.

------Test Page--------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title></title>
<script language="javascript" type="text/javascript">
var newwindow;
function pop_up(url)
{
newwindow=window.open(url,'name','height=700,width=550,status=1,resizable=1');
if (window.focus) {newwindow.focus()}
}
</script>
</head>

<body>
<a href="javascript:pop_up('popuppage1.cfm');">Test</a>
</body>
</html>


----------------Popup page 1--------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title></title>
<script language="javascript" type="text/javascript">
var newwindow;
function pop_up(url)
{
newwindow=window.open(url,'name','height=700,width=550,status=1,resizable=1');
if (window.focus) {newwindow.focus()}
}
</script>
</head>

<body>
<a href="javascript:pop_up('sign_up.cfm');">Test</a>
</body>
</html>

It is the same code, just different link. Can you not do a popup from a popup? Thanks for your help in advance.



Keith


The most likely way for the world to be destroyed, most experts agree, is by accident. That's where we come in; we're computer professionals. We cause accidents.
 
klaforc, it's because you're giving both windows the same name. In popuppage1.cfm make this change:
Code:
newwindow=window.open(url,'[b][COLOR=red]name1[/color][/b]','height=700,width=550,status=1,resizable=1');

-kaht

Do the chickens have large talons?
[banghead]
 
Thanks kaht, your awesome.


Keith


The most likely way for the world to be destroyed, most experts agree, is by accident. That's where we come in; we're computer professionals. We cause accidents.
 
glad I could be of help

-kaht

Do the chickens have large talons?
[banghead]
 
No, really kaht, you are awesome. I just wish there were some way of thanking you, with something purple. Oh well.

Adam

Whatever I feel like I wanna do, gosh!
 
haha, sorry guys my fault


Keith


The most likely way for the world to be destroyed, most experts agree, is by accident. That's where we come in; we're computer professionals. We cause accidents.
 
I was sitting here, going why was his text in purple? :)


Keith


The most likely way for the world to be destroyed, most experts agree, is by accident. That's where we come in; we're computer professionals. We cause accidents.
 
Oh look, a star! I was just going to give him one of these [purpleface]

;)

Adam

Whatever I feel like I wanna do, gosh!
 
I have absolutely no clue what you guys are talking about. [censored]

BTW, thanks for the star[smile]

-kaht

Do the chickens have large talons?
[banghead]
 
haha thanks, I'll take anything I can get, even in pity ;)


Keith


The most likely way for the world to be destroyed, most experts agree, is by accident. That's where we come in; we're computer professionals. We cause accidents.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top