HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
How can I link to a specific word on another page of my web
Post new topic   Reply to topic    HTML Help Forum Index -> General HTML
View previous topic :: View next topic  
Author Message
brian-be



Joined: 09 Apr 2006
Posts: 38

PostPosted: Sun Apr 09, 2006 7:40 am     How can I link to a specific word on another page of my web Reply with quote

How can I link to a specific word on another page of my web site?


This is what I am trying to do.

~One page had a lot of technical words in it.
~I have another page with a list of definitions of the technical terms.
~I can link to the "Definitions" page, but I am trying to link to the specific definition (word) on that page so the user won't have to scroll down to find the definition.
~This is easy to do in MS WORD, but I can't achieve it in HTML...

If there is a way to do this on my web page, I'd be very happy! Very Happy

Thanks,
Brian
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8749
Location: Castle Pines North, CO USA

PostPosted: Sun Apr 09, 2006 8:30 am     Reply with quote

Check out Attribute for <A ...>.

One the page (about.html) you want to link to - set up something like
Code:
<a name="contact"></a>
and then in the page you are setting up the link
Code:
<a href="about.html#contact">Contact Us</a>
and that should do it

_________________
Corey
Loud Commerce |
Loud Worx | Loud Ads
brian-be



Joined: 09 Apr 2006
Posts: 38

PostPosted: Sun Apr 09, 2006 9:35 am     Reply with quote

That is my understanding of how it is suppose to work, but when I try it, it opens the other page at the top of the page.
Does it only open to the specific #word once it has been published to the web? Is there any way to test it out without publishing it. I haven't published a 'site' yet...
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8749
Location: Castle Pines North, CO USA

PostPosted: Sun Apr 09, 2006 2:03 pm     Reply with quote

What is your source code? Are you using any base href in the <head>? Are you using frames?

_________________
Corey
Loud Commerce | Loud Worx | Merchant Account Blog
brian-be



Joined: 09 Apr 2006
Posts: 38

PostPosted: Sun Apr 09, 2006 2:37 pm     Reply with quote

This is my first attempt at a basic, simple web site.
I am using SiteGenWiz and am basically pasting HTML into it.
When I "View Site" SGW generates a page that starts...

<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=windows-1252">
<meta name="generator" content="Enersoft SiteGenWiz Platinum 1.6 (LK=UNDEF), www.enersoft.ch">

<title>As I See It Now</title>
<meta NAME="audience" content="all">
<meta name="revisit-after" content="7 days">

<meta NAME="robots" CONTENT="INDEX,FOLLOW">
<link rel=stylesheet type="text/css" href="./gen.css"> <script language="JavaScript">

etc...

Am I trying to get too complicated for a first try?
I don't plan to use frames.
It's just going to be 5 to 10 pages detailing an experience I had over the last 6 years with photos and and a few links.
Since it has so many 'techinal medical' terms in it, I have a long page of Definitions and I'd like the #word function to link to the specific word so viewers don't have to scroll through the whole list.
I'll probably just have to settle for that until I learn more.
Sure am glad I found this site. Soooo... much to learn...
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8749
Location: Castle Pines North, CO USA

PostPosted: Mon Apr 10, 2006 3:10 am     Reply with quote

So far it looks OK. Do you have this on the web so it can be viewed or more source code?

_________________
Corey
Loud Commerce |
Loud Worx | Loud Ads
brian-be



Joined: 09 Apr 2006
Posts: 38

PostPosted: Mon Apr 10, 2006 5:07 am     Reply with quote

Don't even have a Host or Domain picked out yet.
I want this to be viewable only by approved members, I don't want to make it open to the public. I sued a Doctor for Malpractice, and I want the site to be viewable only by members of my family so the doctors involved can't sue me back!
And I know that posting pages of code on forums is frowned upon.
Practiceboard.com would probably work, but then it would be public!
I'll probably just have to publish it to see if it works. Been thinking about GoDaddy, but am open to suggestions...
Maybe I could just make a sample that doesn't name names so I could post it here...
Don't have much of a 'life' anyway.
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8749
Location: Castle Pines North, CO USA

PostPosted: Mon Apr 10, 2006 6:16 am     Reply with quote

brian-be wrote:
And I know that posting pages of code on forums is frowned upon.
Asking Your Question Not that I know of. Most forums ask for it - I beg for it. Otehrwise it becomes very difficult to help out


_________________
Corey
Loud Commerce | Loud Worx | Toll Free Solutions
brian-be



Joined: 09 Apr 2006
Posts: 38

PostPosted: Mon Apr 10, 2006 6:56 am     Reply with quote

When I do a "View Site" with SGW (shows how it will look when published) it changes my html;
<A href="C:\Documents and Settings\Compaq_Owner\Desktop\SGW 2\DEFINITIONS.htm#colonoscopy">Colonoscopy</A>
to;
<a class="x97" href="C:\Documents and Settings\Compaq_Owner\Desktop\SGW 2\DEFINITIONS.htm#colonoscopy">Colonoscopy</a>
which opens the "DEFINITIONS" but at the top, not at the .htm#colonoscopy.
Can I hope that when it is published that it will change the "C:\ tho the propper url and it will open on the .htm#colonoscopy?
Or even if I have to edit each url, may it work then?
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8749
Location: Castle Pines North, CO USA

PostPosted: Mon Apr 10, 2006 10:45 am     Reply with quote

First - I would use definitions.htm not DEFINITIONS.htm. The reason being - if you are on a *NIX server, it will be case sensitive so DEFINITIONS.htm is not the same as Definitions.htm and definitions.htm. (Windows servers are not case sensitive.)

Now assuming all your files are in the folder (SGW 2), you can just use
Code:
<a href="definitions.htm">Definitions</a>
And of course for the bookmark
Code:
<a href="definitions.htm#colonoscopy">Definitions</a>
assuming you have
Code:
<a name="colonoscopy">Colonoscopy</a>
in the definitions.htm page

Now the first thing would be - does this work? And now you won't have to use the absolute path everytime and will save you time (you won't have to go back and change the paths).

As far as it is changing / adding the class to your <a> tag, it might be the WYSIWYG editor that you are using.

_________________
Corey
Loud Commerce | Loud Worx | Toll Free Solutions
brian-be



Joined: 09 Apr 2006
Posts: 38

PostPosted: Mon Apr 10, 2006 11:31 am     Reply with quote

Corey, I was married (for a short time) to a Bryant over 30 years ago!

If I was 30 years younger, this HTML wouldn't wear out the few grey cells I have left so quickly. I'm about done-in for the day but it seems to make more sence now.
The problem may be in which folders I have the files in,
AND the <a name="colonoscopy">Colonoscopy</a> could be the problem too.
I may have thought I had to put "colonoscopy" where it says 'name'.
I'll try to adjust it later tonight or in the morning and see if it works...
Thanks,
I'll let you know,
Brian

P.S. The CAPS were just for emphasis in these examples but I'll keep that in mind too.
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8749
Location: Castle Pines North, CO USA

PostPosted: Mon Apr 10, 2006 12:18 pm     Reply with quote

Hm, well my name is just my name - very long story there Smile

If you do have the definitions in a folder - you wil need to update / change that path accordingly. But you code looks good

_________________
Corey
Loud Info | Loud Worx | Merchant Account Blog
brian-be



Joined: 09 Apr 2006
Posts: 38

PostPosted: Thu Apr 13, 2006 10:33 am     Reply with quote

Corey,
THANKS ~ with the above help, I was able to get it all working...
It took a while with 47 definitions, but was worth it!

Now, one more small problem: I'm trying to make a transparent GIF 'clickable'.
Is there any way to get rid of the frame around the .gif so it looks better against a background?

Code:
<CENTER>
<font face=Arial size=7 color=red>Click on me</font><BR><BR><A
href="C:\Program Files\Enersoft\SiteGenWiz\html\userfiles\MY-SLIDESHOW\frame1.html">
<img src="TRANSPARENT-GIF"></A><BR><BR><font face=Arial size=7 color=red>to see the show</font>
</CENTER>
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8749
Location: Castle Pines North, CO USA

PostPosted: Thu Apr 13, 2006 10:43 am     Reply with quote

Add the border attribute
Code:
<CENTER>
<font face=Arial size=7 color=red>Click on me</font><BR><BR><A
href="C:\Program Files\Enersoft\SiteGenWiz\html\userfiles\MY-SLIDESHOW\frame1.html" border="0">
<img src="TRANSPARENT-GIF"></A><BR><BR><font face=Arial size=7 color=red>to see the show</font>
</CENTER>


_________________
Corey
Loud Commerce | Loud Worx | Merchant Account Blog
brian-be



Joined: 09 Apr 2006
Posts: 38

PostPosted: Thu Apr 13, 2006 11:32 am     Reply with quote

Rolling Eyes Guess I had kind of a 'brain-freeze there... Embarassed
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> General HTML All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
DARFUR
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial