<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.

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>

thank u...

You are welcome :)

but it still blog by browser,

<snipped>

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.