Opening a new window without onClick

T

Todd Cary

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,status=no,scrollbars=no,resizable=yes')";>&nbsp;
</td>

Todd
 
M

Martin Honnen

Todd said:
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();
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,165
Latest member
JavierBrak
Top