Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    New to the CF scene
    Join Date
    Jan 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Open page at anchor

    So basically what i'm trying to do is when you open the page, it will start in the middle of the content or at the bottom of the page.

    I figured i could pull this off with anchor tags, but the only way i can have it move to the tag automatically is with a refresh command... Which i don't want to do. Do i have any other options?

    Thanks

  • #2
    Senior Coder koyama's Avatar
    Join Date
    Dec 2006
    Location
    Copenhagen, Denmark
    Posts
    1,246
    Thanks
    1
    Thanked 5 Times in 5 Posts
    Why refresh? Could you not open the page directly with the anchor using:
    Code:
    http://somedomain.com/file.html#myanchor

  • #3
    New to the CF scene
    Join Date
    Jan 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    My mistake, i probably should have mentioned. I don't have control over the link that goes to my page. So thats out of my hands.

  • #4
    Regular Coder
    Join Date
    Apr 2006
    Posts
    117
    Thanks
    2
    Thanked 0 Times in 0 Posts
    I am not sure what you want... Don't worry, it happens alot with me.

    All I am getting is either you want to open a page in a Frame, or in a new Window.

    You would have to use <frame> and its sister tags for frames w/ target="frame_name" as an attribute in the Anchor tag, or target="_blank" to open in a new window.

  • #5
    New to the CF scene
    Join Date
    Jan 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i'll rephrase it, maybe i didn't put it so clearly earlier.

    There will be a link to WebsiteA; i don't have control of this link, so i can't add any codes to it.

    When WebsiteA opens, instead of starting at the top of the page(default), i need it to start at the bottom. So the viewer has to scroll up to see the beginning of the page.

  • #6
    Senior Coder koyama's Avatar
    Join Date
    Dec 2006
    Location
    Copenhagen, Denmark
    Posts
    1,246
    Thanks
    1
    Thanked 5 Times in 5 Posts
    well otherwise you could use JavaScript
    Code:
    <a id="myanchor" name="myanchor"></a>
    ...
    <script type="text/javascript">
    document.getElementById('myanchor').focus();
    </script>

  • #7
    Regular Coder
    Join Date
    Apr 2006
    Posts
    117
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Well, if you don't have access to edit the actual anchor tag, you probably won't be able to do so, unless you can make the url of that anchor "url.com/page.html#BottomOfPage"


    and then put <a name="BottomOfPage"></a> where you want the page to load.

    Otherwise, I think you may be S.O.L. even using the above script.

    What are you using to host? a FreeHosting site? Because that doesn't sound like a very good one... If you want suggestions I can give you some. PM me.

  • #8
    Regular Coder
    Join Date
    Apr 2006
    Posts
    117
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Wait, the above script amy work, if you can edit in Anchor tags, but not edit the navigation links. My bad

  • #9
    New to the CF scene
    Join Date
    Jan 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ha, Java's not allowed. Only HTML and CSS. Oh well guess i'm out of luck. I appreciate yalls time.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •