Jump to content


Photo

php popup window


  • Please log in to reply
7 replies to this topic

#1 bob_the _builder

bob_the _builder
  • Members
  • PipPipPip
  • Advanced Member
  • 207 posts

Posted 01 September 2006 - 11:02 PM

Hi,

Is it posible to make a popup window that will resize to the image size + room for the desciption using php without any javascript?

The description is stored in the database and the image name+extension is stored in the database with the images in a folder on the server.

Thanks

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 01 September 2006 - 11:03 PM

PHP cannot create popup windows. If you want to create a popup window you'll have to use javascript

#3 bob_the _builder

bob_the _builder
  • Members
  • PipPipPip
  • Advanced Member
  • 207 posts

Posted 01 September 2006 - 11:26 PM

reword I think:

Have it so you click on a link and have it open the image in a new window (popup effect), then using php have it resize the browser to the image size + enough to show the descripton and a link to close the window.

Thanks

#4 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 01 September 2006 - 11:32 PM

PHP cannot resized the browser. PHP cannot do anything to the clients browser window like javascript can. You open a new window with normal html when you click a link. Use target="_blank" in your anchor tag, eg:
<a href="http://google" target="_blank">Google</a>

What you are aksing is not possible with PHP AFAIK. The only option is javascript if you want to resize the browser window, create a popup etc.

#5 bob_the _builder

bob_the _builder
  • Members
  • PipPipPip
  • Advanced Member
  • 207 posts

Posted 01 September 2006 - 11:38 PM

Ok,

I have some javascript at presant that works, But I cant make it allow room for the image description and a close window link, It all ends up hidden behind the image.

#6 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 01 September 2006 - 11:40 PM

I am going to move this to the javascript help forum as this has nothing to do with PHP.

#7 benhodgson

benhodgson
  • Members
  • PipPip
  • Member
  • 11 posts
  • LocationLeicester, UK

Posted 02 September 2006 - 12:24 AM

I think I get what you mean. You want PHP to read the image size, and then pass it to the Javascript popup code so that the popup will be the right size?

#8 bob_the _builder

bob_the _builder
  • Members
  • PipPipPip
  • Advanced Member
  • 207 posts

Posted 02 September 2006 - 12:33 AM

Hi,

yep along those lines .. but also to create enough extra space in the popup to display the photo description and a link to close the window.


Thanks




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users