By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,568 Members | 1,688 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,568 IT Pros & Developers. It's quick & easy.

Opening a new window without onClick

P: n/a
I am using PHP to create a button on a window so that a new window is
created when the button is clicked. Is there a way to create a new
window inline; that is create a window on top of the current window
without having the surfer press a button?

Here is my current onClick code:

<input name="btnView" type="button" value="View"
onClick="MM_openBrWindow('claim_pdf.php?session_id =1095690357&pdf_file=1000481.pdf','','toolbar=no,s tatus=no,scrollbars=no,resizable=yes')";>&nbsp;
</td>

Todd
Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a


Todd Cary wrote:
I am using PHP to create a button on a window so that a new window is
created when the button is clicked. Is there a way to create a new
window inline; that is create a window on top of the current window
without having the surfer press a button?


Well some years ago you could do
<html>
<head>
<script type="text/javascript">
var win = window.open('whatever.html', 'windowName',
'put desired window features here');
</script>
and you got your popup window but nowadays latest browsers block popups
created that way to prevent web sites from populating your desktop with
advertisement popup windows.
Therefore you shouldn't build a site relying on opening unrequested
popup windows as that way your web site with many browsers like Mozilla,
Netscape 7, Opera 7, IE 6 on Win XP SP 2 will not work as intended.
You can of course still try the above and check
if (win != null && !win.closed) {
// do something with window here e.g.
win.focus();
}

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.