954,568 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

open popup without using function

<html>
<head></head>
<body>

<?php
print "<script type='text/javascript'>";

print "window.open='http://www.examples.com/page.html','new_window1','status=1,scrollbars=1,resizable=0,menu=no,width=320,height=220'";

print "</script>";  
?>
</body>
</html>


Not able to open popup.Is this correct code.

kings
Junior Poster
107 posts since Nov 2007
Reputation Points: 3
Solved Threads: 2
 

Try this.

<html>
<head>
</head>
<body>
<?php
print "<script type='text/javascript'>";
print "window.open('http://www.examples.com/page.html','new_window1','status=1,scrollbars=1,resizable=0,menu=no,width=320,height=220');";
print "</script>";  
?>
</body>
</html>
nav33n
Purple hazed!
Moderator
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
 

thank u...

kings
Junior Poster
107 posts since Nov 2007
Reputation Points: 3
Solved Threads: 2
 

You are welcome :)

nav33n
Purple hazed!
Moderator
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
 

but it still blog by browser,

vnfriendly
Newbie Poster
1 post since Jul 2010
Reputation Points: 10
Solved Threads: 0
 

Hi could anyone advise what I should change with the code below to stop these been treated like a pop up window, it would be acceptable if it openned in new tab or second use of browser on top of current window.

$chat = "window.open( '" . SK_Navigation::href("private_chat", array("userKey"=>$pr_key, "oppUserKey"=>$opp_key, 'is_esd_session'=>1 )) . "', '', 'height=540,width=415,left=100,top=100,scrollbars=no,resizable=no' );";


Thanks

dremes
Newbie Poster
4 posts since Feb 2012
Reputation Points: 7
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You