gple Posted May 28, 2007 Share Posted May 28, 2007 Anyone know of a way in pHp in order for this: Click on a thumbnail image and a new screen pops up but only as the size of the image. I have found some java script stuff but it doesnt seem to be working with my php coding. Any way to do this without java script and with php. Quote Link to comment https://forums.phpfreaks.com/topic/53333-pop-up-images/ Share on other sites More sharing options...
AndyB Posted May 28, 2007 Share Posted May 28, 2007 No. The size of a new window is controlled by the client (browser) not server-side code (php). Javascript is an ideal solution, executing within an html page. If your's "doesn't seem to be working" then either the code you got is bad or your implementation is flawed. Quote Link to comment https://forums.phpfreaks.com/topic/53333-pop-up-images/#findComment-263563 Share on other sites More sharing options...
gple Posted May 29, 2007 Author Share Posted May 29, 2007 echo "<A HREF=javascript:popUp('image_up.php?image=".$image."')>Open the Popup Window</A>"; the problem here is that the image is something like (new image1.jpg). It only reads new and ignores after the space. Any idea. Quote Link to comment https://forums.phpfreaks.com/topic/53333-pop-up-images/#findComment-263567 Share on other sites More sharing options...
AndyB Posted May 29, 2007 Share Posted May 29, 2007 Well, the obvious solution would be to avoid spaces in file names in the first place. If you have control over image naming, take care of that first. You might be able to trick js by converting the space to %20 .... $image = str_replace(" ","%20",$image) Quote Link to comment https://forums.phpfreaks.com/topic/53333-pop-up-images/#findComment-263582 Share on other sites More sharing options...
radi8 Posted May 29, 2007 Share Posted May 29, 2007 Check out and use the javascript from http://www.walterzorn.com/tooltip/tooltip_e.htm it is really easy to use, and works perfectly. Quote Link to comment https://forums.phpfreaks.com/topic/53333-pop-up-images/#findComment-263699 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.