Help with html editing

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

CF128

Thread Starter
Joined
Jul 4, 2004
Messages
223
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 :)
 
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)
 

CF128

Thread Starter
Joined
Jul 4, 2004
Messages
223
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?
 
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.
 

CF128

Thread Starter
Joined
Jul 4, 2004
Messages
223
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
 
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();">
 
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?
 
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>
 
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
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

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 807,865 other people just like you!

Latest posts

Members online

No members online now.
Top