1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

check the height of a page with dynamic vertical content

Discussion in 'JavaScript' started by david_sakh, Jan 18, 2005.

  1. #1
    I want to perform a function if the height of the page is over a certain pixel value. Is this possible?
     
    david_sakh, Jan 18, 2005 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    No... PHP generates the output before the code is rendered. Your best option would be something in JavaScript.
     
    digitalpoint, Jan 18, 2005 IP
  3. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Not with PHP. Javascript can get at least the screen resolution as well as the current browser window resolution. Get those values into PHP and take it from there.

    Not a JS wizz so can't help further than this...
     
    T0PS3O, Jan 18, 2005 IP
  4. david_sakh

    david_sakh Peon

    Messages:
    1,225
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I'll do some javascript searches, but I haven't done much with it before, other than look at scripts others have made, but this doesn't sound all that difficult. If you want to move this topic shawn, i'll understand.
     
    david_sakh, Jan 18, 2005 IP