iframe scrolling

S

spinybabler

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
 
D

dorayme

spinybabler said:
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.
 
H

Herbert Blenner

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
 
S

spinybabler

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
 
S

spinybabler

@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.
 
A

Adrienne Boswell

Gazing into my crystal ball I observed spinybabler
@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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,737
Latest member
Georgeengab

Latest Threads

Top