Jump to content

[SOLVED] PHP and popup windows


ballouta

Recommended Posts

Hello

 

I have three short news paragraphs, with each paragraph there is "more" button.

It should open the full news.

Those paragraphs are stored in DB.

 

I want to know if there's a nice way to pop up the "more news" windows in a nice way rather than the regular javascript, taking in consideration that the more button will hold the ID of this news in the URL.

 

I am not aksing you to write a code for me, but I need to use smthg already found online (Demo/Example),

 

Many thanks

Link to comment
https://forums.phpfreaks.com/topic/153623-solved-php-and-popup-windows/
Share on other sites

PHP is a server side script and can't do that.

 

You have to use a client side thing to do a popup.

 

Use html target="_blank", javascript window.open, AJAX to bring a div in front and display the content or maybe flash or any other client side 3rd party plugin.

u need javascript not php..

well, use this function in the head of your html page

 

<script language="javascript" type="text/javascript">
function Open(page) {
OpenWin = this.open(page, "new", "width=465,height=325,scrollbars=yes,resizable=yes");
}
</script>

 

now use it on your hypertext link :

 

<a href="javascript:Open('new_window.php')">Open in new window</a>

 

this should work ;)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.