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.

Different Window Height when a program is run in IFRAME & without IFRAME

Discussion in 'jQuery' started by vikaspa, Aug 2, 2013.

  1. #1
    Dear All
    The actual program is in IFRAME is membersearch.php
    http://webvikas.net.in/quote/admin/memberselect.php
    when I click check box, I get following values
    I am using following script

    Copy code
    1. alert("window height "+$(window).height());
    2. alert("this Scroll TOP "+$(this).scrollTop());

    window height : 1250
    Scrol TOP : 0
    Due to wrong values, my DIV is not displayed in center
    however when i run this the very same program in separate window

    http://webvikas.net.in/quote/admin/membersearch.php
    I get
    window height : 799
    Scrol TOP : 0

    As a result the DIV is displayed in center perfectly well
    MY CSS is above JQUERY
    using
    <!DOCTYPE html>
    and tested in chrome
     
    vikaspa, Aug 2, 2013 IP
  2. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #2
    That's because a frame IS a window... as such you are getting the size of the IFRAME, not the window the IFRAME is in.

    Though this is 2013, not 1997. Why are you futzing around with frames?

    ... much less the code bloat of the inlined and long deprecated bgcolor attribute and classes for nothing?
     
    deathshadow, Aug 2, 2013 IP