You are here:

DHTML/bookmark in iframe

Advertisement


Question
Dear Andrew,

I have place a small calendar in a iframe with bookmark to go from one month to another.

The problem is that the iframe default page with a bookmark so it opens on the current month. But, because of that bookmark when the page opens it move down to the bookmark into the iframe.

See the example on: http://www.iqdho.com/neo/francais/activites.html

Do you know how can I solve this problem?

Sorry the draft are all in French.

Thanking you in advance for your prompt attention!

Answer
Unfortunately, this is the nature of how the anchors work.  The way you have it set up doesn't really give you any options around the downward page bump.  If you want to keep the iframe functionality, I would store the HTML <table> code for each month in a separate file.  Then, during the onchange event of the month <select>, you could load the corresponding month file into the <iframe>.  I realize this isn't ideal, but it may be the fastest fix given the way you things arranged.

- Andrew

DHTML

All Answers


Answers by Expert:


Ask Experts

Volunteer


Andrew Hoffman

Expertise

Ask me about JavaScript, CSS, HTML5/XHTML, or PHP. Chances are I'll be able to help you. I know the economy is in the tank, but if you like my answer, please consider donating a few bucks. It's like tipping your barista, if your barista served fresh code instead of coffee.

Experience

I started doing this when boy bands were still cool.

Education/Credentials
I read a lot of nerdy books to get here.

©2012 About.com, a part of The New York Times Company. All rights reserved.