popup windows with php? 
Author Message
 popup windows with php?

Hi,

Is it possible to write a php script that directs the client browser
to open a new window (without javascript involved)? If it is, can
somebody tell me how?

TIA



Fri, 07 Oct 2005 02:16:56 GMT  
 popup windows with php?

Quote:

> Is it possible to write a php script that directs the client browser
> to open a new window (without javascript involved)?

Yes.  The answer has nothing to do with PHP though; it's pure HTML...  

Example One.

  <a href="script.php" target=_blank>Click here</a>

  When the user clicks on the link above, script.php is executed in
  a new window.

Example Two.

  <form method="post" action="script.php" target=_blank>
  <input type="submit" value="Submit">
  </form>

  When the user clicks on the Submit button, script.php is, again,
  executed in a new window.  

Cheers,
NC



Fri, 07 Oct 2005 11:45:59 GMT  
 popup windows with php?

Quote:

> Hi,

> Is it possible to write a php script that directs the client browser
> to open a new window (without javascript involved)? If it is, can
> somebody tell me how?

> TIA

sure

echo '<script language="JavaScript">open("ooh","ahh.html","or
whatever");</script>';



Fri, 07 Oct 2005 19:06:25 GMT  
 popup windows with php?

Quote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1

> In a fit of e{*filter*}ment on Mon, 21 Apr 2003 21:06:25 +1000, Terence


>>>Hi,

>>>Is it possible to write a php script that directs the client
>>>browser to open a new window (without javascript involved)?

>                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^

>>>If it is, can somebody tell me how?

>>>TIA

>>sure

>>echo '<script language="JavaScript">open("ooh","ahh.html","or

>                           ^^^^^^^^^^

>>whatever");</script>';

> Yeah? ;)

Geez, what does one have to do to get flamed around here?!

I was feeling very cynical/{*filter*} at the time :)
Tony Marston would not be impressed (sorry Tony)
but seriously, how does one answer a question like that?

I should have left the language attribute out alltogether.
I could have done echo '<body onload="open(...);">';
and hoped that Xeon didn't notice :D

Lucky I didn't get flamed :O
knock wood...



Sun, 09 Oct 2005 20:24:24 GMT  
 popup windows with php?


Quote:

> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1

> > In a fit of e{*filter*}ment on Mon, 21 Apr 2003 21:06:25 +1000, Terence


> >>>Hi,

> >>>Is it possible to write a php script that directs the client
> >>>browser to open a new window (without javascript involved)?

> >                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^

> >>>If it is, can somebody tell me how?

> >>>TIA

> >>sure

> >>echo '<script language="JavaScript">open("ooh","ahh.html","or

> >                           ^^^^^^^^^^

> >>whatever");</script>';

> > Yeah? ;)

> Geez, what does one have to do to get flamed around here?!

> I was feeling very cynical/{*filter*} at the time :)
> Tony Marston would not be impressed (sorry Tony)
> but seriously, how does one answer a question like that?

Who me? The only way I know of to open a new window on the client browser
without the use of JavaScript is to use pure HTML. Note that this is not a
deficiency of PHP because PHP is server-side and after sending the HTML
document to the client everything else that happens is controlled totally by
the client browser, which means using standard HTML or invoking some sort of
client-side scripting (eg: JavaScript, VB script).

The pure HTML solution is to use the TARGET directive on the ANCHOR tag. Two
possible options are:
a) _blank renders the link in a new, unnamed window
b) _top renders the link in the full, unframed window

Tony Marston



Sun, 09 Oct 2005 21:21:15 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Problem with mouse wheel and popup under windows

2. Hiding menu in popup-window

3. Windows Explorer Popup menu options

4. Instant messenger type popup windows

5. Popup window doesn't close (BUG?)

6. controls with template on a popup-window?

7. Popup help window won't display

8. Disable javascript to avoid popup windows.

9. popup window with "anchor" node

10. Opening a popup window

11. How: 2D popup window

12. Javascript popup window

 

 
Powered by phpBB® Forum Software