Msg#: 10701 posted 9:39 am on Jul 27, 2005 (gmt 0)
Hi I have a page and I want to have an iframe centered at the top and below it alot of little images, when I click on the image i want the image to resize to fit the iframe (obviously the image being bigger than the iframe) Can anyone help I dont know anything about php or the likes thank you
A very efficient way to get the results you're asking for, is to use a bit of server-side scripting. I'll put here a sample in ASP, but this is also doable on php and almost any server-side scripting technology. Replace the $x, $y, $filename and things like those with the params you need. The host file (the file where the iframe is): ... <iframe name="the_frame" height="$y" width="$x"></iframe> <a href="show_img.asp?fname=$file1.jpg" target="the_frame"> <img src="$file1.jpg" height="$y1" width="$x1" alt="click to enlarge" /> </a> ... <iframe name="the_frame" height="$y" width="$x"></iframe> <a href="show_img.asp?fname=$fileN.jpg" target="the_frame"> <img src="$fileN.jpg" height="$yN" width="$xN" alt="click to enlarge" /> </a>
The only difficult part is to keep html params "quoted" without these quotes being parsed by the ASP as opening/closing of strings. The call Chr(34) returns a 1-length string with the 34th character in ASCII, which is '"'. Beyond the weird thing of the quotes, I think there is no difficulty on implementing that; even so, if you have any doubt or question, I'll be glad to help you either via reply (generic questions) or sticky mail (if specifics are needed).