TeamPhotoshop
Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
Forum Home Latest Posts Search Help Subscribe

Another question

Page: 1 Reply
Jan 10th 2003#85297 Report
Member since: Jan 9th 2003
Posts: 2
if i have an iframe on my page, say 400Pxi wide and 200pxi high.

and i also have a menu, witch points to various images, and all the images have the same width (400pix) but not the same height.

my question is:
would it be possiple to open these images in the iframe, and make the iframe dynamicly expand and collapse according to what size image is being shown...
Alll this in order to not having to open the images in new window or refreshing the entire page.

Been searching some hours for a script, but no luck sofar...




regards .

A code example would be nice
Reply with Quote Reply
Jan 16th 2003#86104 Report
Member since: Dec 17th 2002
Posts: 150
hmmmmmm....i'm not an expert with i-frames...well, to be honest i avoid them :|.
but here's a shot.....
you could put the iframe in a table....and set the iframe's parameters to 100% high....making it the height of whatever is in it, or you can just adjust your images to fit

note: the table height and length parameters would need to be in %age.

You could also just make the iframe height big enough so it won't need a scroller and fill the low-info pages with low-file size junk
Reply with Quote Reply
Jan 16th 2003#86106 Report
Member since: Mar 24th 2002
Posts: 3114
Iframes tend to break out from cells in tables, so be careful.
There is a way to do that with JavaScript, but it would get pretty complicated.

You could put the iframe inside a DIV, with an ID,
and then according to the height of the image use something like this:
[PHP]
function makesize(height,pic)
divid.innerHTML="";
[/PHP]

and call that with a link like

[PHP]
Link
[/PHP]

...but that'd get pretty ugly. :(
Reply with Quote Reply
Page: 1 Back to top
Please login or register above to post in this forum