Jump to content

Get height/width of another page


Jagarm

Recommended Posts

Hello everyone,

 

My web site http://beta.berwari.net/music uses an iframe to display a music page from http://music.berwari.net/andromeda.php, since I cannot use it otherwise. So I am trying to get height of the other page in order to set the iframe height the same size as the other page.

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/129129-get-heightwidth-of-another-page/
Share on other sites

Yeah.  I don't get what you mean by height/width of the iframe, since it seems like the page is full width/height of the screen when you access it directly.  Also, why can't you 'use it otherwise' if the page is on the same site? >_>  Just explain a little bit more and hopefully someone can help.

I just realized that I have posted on the wrong topic under regex where it should be under php help. Apologize for that.

 

I have this page: http://music.berwari.net/andromeda and I display it inside an iframe in http://beta.berwari.net/music, right now I have a fixed width of 2500px. I want to know if there is a way to get the height of http://music.berwari.net/andromeda and use that height on the iframe, so nobody notices it is an iframe I'm using.

 

I hope this makes it clear.

 

Thanks for the reply

Come to think of it, you might be able to pull off some Javascript solution.  Read the search results for 'javascript document height'.  I thought of it and searched, then found things like:

http://codylindley.com/Webdev/295/javascript-get-page-height-with-scroll

 

Try some things out.  It might take some clever JS to actually work though. >_<

I found other sites with the same issue as me like the following site: http://www.webdeveloper.com/forum/showthread.php?t=93094 but still does not work. I'm playing around with it, hopefully it'll work. I know it'll deny me to get the height from another domain but both of the pages are on the same domain.

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.