GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   well .. so PHP guys .. how to get HEIGHT of the page in pixels ? (https://gfy.com/showthread.php?t=232541)

Andy 02-07-2004 11:23 AM

well .. so PHP guys .. how to get HEIGHT of the page in pixels ?
 
is there some useful piece of code that can do this ?
like .. get remote page height ?

Volantt 02-07-2004 11:36 AM

Quote:

Originally posted by Andy
is there some useful piece of code that can do this ?
like .. get remote page height ?

Not in PHP since it is a server side scripting language.

You will have to use J A V A S C R I P T

See: http://developer.irt.org/script/1166.htm


V

rickholio 02-07-2004 11:39 AM

One method I've used is to grab the size via hahahahahahahahahaha and store it in a cookie or post it back on the next page update. Here's an example to return page width, which I used to adjust page layouts dynamically:

PHP Code:

function findWidth() {
  if (
self.innerHeight) return self.innerWidth// all except Explorer
  
if (hahahahahahahahahahadocumentElement && hahahahahahahahahahadocumentElement.clientHeight) return hahahahahahahahahahadocumentElement.clientWidth// Exp
lorer 6 Strict Mode
  
if (hahahahahahahahahahabody) return hahahahahahahahahahabody.clientWidth// Other DOM compliant browsers
  
return 1024// "None of the above"


I'd then put that value in a cookie for php's use. You might also want to track resize events if it's important to know the size at all times.

rickholio 02-07-2004 11:40 AM

oh ffs... how the hell is anyone supposed to demonstrate code with that obnoxious filtering? :mad:

4Pics 02-07-2004 11:46 AM

post a link to it on your server as a phps file so we can see it?


All times are GMT -7. The time now is 06:35 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123