Hi could anyone advise what I should change with the code below to stop these been treated like a pop up windows, it would be best 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

Recommended Answers

All 4 Replies

This thing is Browser Implementation Dependent, so you'll need to hunt after specific browser solutions and if.

Well, since you mentioned that it would work if it just opened in a new tab ... why not just use plain old HTML to open the chat app in a target="_blank" and pass the necessary vars via the URL string?

Well, since you mentioned that it would work if it just opened in a new tab ... why not just use plain old HTML to open the chat app in a target="_blank" and pass the necessary vars via the URL string?

Hi Jawanda,

Thanks for your help... could you show me how this would be achieved?

What would the new code look like?

Current Code
$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' );";

Many thanks once again

dremes

This thing is Browser Implementation Dependent, so you'll need to hunt after specific browser solutions and if.

You say the solution shall be browser specific code, however all browsers seem to currently treat it in the same way, all resulting in needing to add the site to the allow pop ups list!

Would there not be a code change that could just open this in a new tab in all browsers?

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.