iframe scrolling

Discussion in 'HTML' started by spinybabler, Aug 6, 2009.

  1. spinybabler

    spinybabler Guest

    Hi,

    I have a iframe where there is an html page with image map loaded. I
    have set scrolling to Auto. Whenever I scroll down or to the side and
    then click on an image area, the iframe resets to the top position.
    The problem is i need it to be in the same position as it was before
    it was clicked. My onclick event simply displays a div with a border
    over the area to mark it as highlighted. So i want the page to remain
    in its position.

    This should be simple i think but couldn't figure out how. I would
    highly appreciate your help.

    Thanks
    spinybabler, Aug 6, 2009
    #1
    1. Advertising

  2. spinybabler

    dorayme Guest

    In article
    <>,
    spinybabler <> wrote:

    > Hi,
    >
    > I have a iframe where there is an html page with image map loaded. I
    > have set scrolling to Auto. Whenever I scroll down or to the side and
    > then click on an image area, the iframe resets to the top position.
    > The problem is i need it to be in the same position as it was before
    > it was clicked. My onclick event simply displays a div with a border
    > over the area to mark it as highlighted. So i want the page to remain
    > in its position.
    >
    > This should be simple i think but couldn't figure out how. I would
    > highly appreciate your help.
    >


    Be nice to see a URL of your effort.

    --
    dorayme
    dorayme, Aug 7, 2009
    #2
    1. Advertising

  3. On Aug 6, 1:42 pm, spinybabler <> wrote:
    > Hi,
    >
    > I have a iframe where there is an html page with image map loaded. I
    > have set scrolling to Auto. Whenever I scroll down or to the side and
    > then click on an image area, the iframe resets to the top position.
    > The problem is i need it to be in the same position as it was before
    > it was clicked. My onclick event simply displays a div with a border
    > over the area to mark it as highlighted. So i want the page to remain
    > in its position.
    >
    > This should be simple i think but couldn't figure out how. I would
    > highly appreciate your help.
    >
    > Thanks


    Does your event handler contain return false?

    Example: onclick="dosomething();return false"

    Herbert
    Herbert Blenner, Aug 7, 2009
    #3
  4. spinybabler

    spinybabler Guest

    On Aug 7, 12:33 am, Herbert Blenner <> wrote:
    > On Aug 6, 1:42 pm, spinybabler <> wrote:
    >
    > > Hi,

    >
    > > I have a iframe where there is an html page with image map loaded. I
    > > have set scrolling to Auto. Whenever I scroll down or to the side and
    > > then click on an image area, the iframe resets to the top position.
    > > The problem is i need it to be in the same position as it was before
    > > it was clicked. My onclick event simply displays a div with a border
    > > over the area to mark it as highlighted. So i want the page to remain
    > > in its position.

    >
    > > This should be simple i think but couldn't figure out how. I would
    > > highly appreciate your help.

    >
    > > Thanks

    >
    > Does your event handler contain return false?
    >
    > Example: onclick="dosomething();return false"
    >
    > Herbert


    @Herbert: Yes i do return false.

    @dorayme: it's not yet a public url. just started on it.

    Thanks
    spinybabler, Aug 7, 2009
    #4
  5. spinybabler

    spinybabler Guest

    On Aug 7, 12:42 pm, spinybabler <> wrote:
    > On Aug 7, 12:33 am, Herbert Blenner <> wrote:
    >
    >
    >
    >
    >
    > > On Aug 6, 1:42 pm, spinybabler <> wrote:

    >
    > > > Hi,

    >
    > > > I have a iframe where there is an html page with image map loaded. I
    > > > have set scrolling to Auto. Whenever I scroll down or to the side and
    > > > then click on an image area, the iframe resets to the top position.
    > > > The problem is i need it to be in the same position as it was before
    > > > it was clicked. My onclick event simply displays a div with a border
    > > > over the area to mark it as highlighted. So i want the page to remain
    > > > in its position.

    >
    > > > This should be simple i think but couldn't figure out how. I would
    > > > highly appreciate your help.

    >
    > > > Thanks

    >
    > > Does your event handler contain return false?

    >
    > > Example: onclick="dosomething();return false"

    >
    > > Herbert

    >
    > @Herbert: Yes i do return false.
    >
    > @dorayme: it's not yet a public url. just started on it.
    >
    > Thanks

    It worked. Initially i was returning false from the event handler
    function itself and it didn't work. But now I returned false like u
    showed in the example: eventHandler(); return false; And it worked.
    Isn't both supposed to be same?

    Anyway thanks a lot for the help.
    spinybabler, Aug 7, 2009
    #5
  6. Gazing into my crystal ball I observed spinybabler
    <> writing in news:c04b817f-0813-4b3b-ae2d-
    :

    > @dorayme: it's not yet a public url. just started on it.
    >


    One thing you will learn here it there are two important things to do
    before posting to alt.html:
    1. Load your efforts on to a public server somewhere

    If you do not have a domain, and do not have a lot of money floating
    around, your ISP probably gave you free space on one of their servers,
    other wise, look into one of the free web hosting providers.

    2. Validate your work

    Often, fixing validation errors will make whatever problem you have
    disappear, or at least it might lead you to where the problem actually
    lies. Validation is a good first step in debugging.

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
    Adrienne Boswell, Aug 7, 2009
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Harley

    Iframe scrolling area

    Harley, Dec 17, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    553
    IbrahimMalluf
    Dec 17, 2003
  2. Mel
    Replies:
    1
    Views:
    3,039
    Blinky the Shark
    Apr 7, 2005
  3. Mel
    Replies:
    2
    Views:
    23,290
    the idiot
    Apr 8, 2005
  4. Daedalous
    Replies:
    3
    Views:
    683
    Daedalous
    Jan 16, 2004
  5. jerrygarciuh

    Scrolling an iFrame in IE7

    jerrygarciuh, Jun 19, 2007, in forum: Javascript
    Replies:
    1
    Views:
    70
    jerrygarciuh
    Jun 19, 2007
Loading...

Share This Page