1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Help with html editing

Discussion in 'Web Design & Development' started by CF128, Jan 10, 2006.

Thread Status:
Not open for further replies.
Advertisement
  1. CF128

    CF128 Thread Starter

    Joined:
    Jul 4, 2004
    Messages:
    222
    Okay, im not even sure if you can do this but what I'm trying to do is make my website scroll down to a particular spot as soon as it appears on peoples screens. I can make it scroll down after the page is fully loaded but it would be great if I could have it scroll before that. If anyone has any ideas for what I can do or where I can go to maybe find out it would be great.
    Thanks :)
     
  2. Sequal7

    Sequal7

    Joined:
    Apr 14, 2001
    Messages:
    2,382
    Is this is link on a page, or immediately when they load your site? If it is a link, then all you do is create a bookmark at the area you want the page to link to, (example, create a bookmark and name it area1) then use #area1 as the hyperlink (example mypage1.htm#area1)
     
  3. CF128

    CF128 Thread Starter

    Joined:
    Jul 4, 2004
    Messages:
    222
    Oh ok cool. How would I go about making it load in a particular spot if it wasn't a link, say if they just typed in my website address, can it be set to load like half way down the page then?
     
  4. Sequal7

    Sequal7

    Joined:
    Apr 14, 2001
    Messages:
    2,382
    Not as a entry, example, if someone goes to your site, www.yoursite.com and the page loads, it will load at the top.

    You can do a redirect.

    1) Create the bookmark that you want to load on the index.htm page.
    2) Rename index.htm to entry.htm (you will need to update links on other pages pointing to index.htm)
    3) create a new index.htm page with this on it:
    <html>
    <head>
    <META HTTP-EQUIV="Refresh" CONTENT="0; url=entry.htm#link1">
    </head>
    <body>
    </body>
    </html>
    note*link1 must be changed to your actual bookmark name

    Uplaod to your server, the newly created index.htm page will now load immediately page1.htm and go right to your bookmark.
     
  5. CF128

    CF128 Thread Starter

    Joined:
    Jul 4, 2004
    Messages:
    222
    Wow thanks man. I'll do that now.
     
  6. CF128

    CF128 Thread Starter

    Joined:
    Jul 4, 2004
    Messages:
    222
    Damn. It still waits until the page is fully loaded with a bookmark. Is there any other way I can do it without it having to fully load
     
  7. Sequal7

    Sequal7

    Joined:
    Apr 14, 2001
    Messages:
    2,382
    You can do this with php or asp, but not html.

    Try adding a javascript to the entry.htm page in an onload event:
    <script>
    function init()
    {
    window.location.href = window.location.href + "#link1";
    }
    </script>

    then add this to you <body> tag
    <body onLoad="init();">
     
  8. AKA Arizona

    AKA Arizona

    Joined:
    Jul 22, 2003
    Messages:
    2,905
    I have a question in the same line as this, I understand the hypertext link part but where my knowledge fails is at the other. for example on a link say http://www.ecocleancarpets.net/carpet.htm
    I want the link to point to a section of the page say deoderizer so I would make the link
    <a href="http://www.ecocleancarpets.net/carpet.htm#smelly">deoderizer</a> now im at my lost part on the page where the deoderizer info is what do I put?
     
  9. AKA Arizona

    AKA Arizona

    Joined:
    Jul 22, 2003
    Messages:
    2,905
    OK I searched a little more and found the answer :) <a name="smelly"></a> do I need the closing </a> ? so it should go either
    <a href="http://www.ecocleancarpets.net/carpet.htm#smelly"> or if its on the page itself I could just make it <a href="smelly">deoderizer</a>
     
  10. Sequal7

    Sequal7

    Joined:
    Apr 14, 2001
    Messages:
    2,382
    Hello
    You need the closing tag.

    As far as your link, you could use either
    One is an absolute path, <a href="http://www.ecocleancarpets.net/carpet.htm#smelly">smelly</a> the other is a relative link <a href="#smelly">deoderizer</a>, meaning it is relative to the linking pages directory
     
  11. AKA Arizona

    AKA Arizona

    Joined:
    Jul 22, 2003
    Messages:
    2,905
  12. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/432768

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice