Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Iframe & anchor help

Options
  • 13-07-2006 9:28am
    #1
    Closed Accounts Posts: 72 ✭✭


    I have an iframe that is created as follows:

    <iframe id="mainiframe" src="/content/new/6.1.htm#anchor1" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none"></iframe>

    I am loading the iframe with the document 6.1.htm, and I would like the iframe to load the document at the anchor point "anchor1".

    My problem is as follows. Sometimes the page 6.1.htm loads correctly at anchor1. But other times it just loads at the top of the 6.1.htm page, then if I refresh the browser it will load correctly at anchor1.

    So I am assuming my code is in some way working as nearly half the time it loads exactly the way I want it to. I'm just trying to find out what is going wrong the other half of the time.

    What makes the problem more confusing is that the iframe and anchor points works perfectly on my local apache server that I am using to test my website, but once I upload it to my hosting company (hosting365) then the problem occurs. I emailed them to ask them but they just said it was my coding and not their fault.

    Does anyone know of any reasons why this might occur? I'm not sure how it can be my coding if it works perfectly on my apache server, but then only had problems running on their servers.

    Thanks in advance for any help you could provide.


Advertisement