Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 11-13-2008, 01:23 PM   #1
Kickin' it
Staff
Premium Member
 
Alaron's Avatar
 
Join Date: Jan 2002
Location: USA
Posts: 7,723
Send a message via AIM to Alaron
Linking to another spot on the same page

Hey all. I'm an HTML newbie and could use some help. I'm trying to create a list that works similarly to this one: http://www.buyusa.gov/auto/team.html , where you click on the state and the browser drops down to that area of the page. I'm not concerned about bullets or the gray 'To the Top" bar.

Anywho, I've been trying to use < a href="state1" >State< /a > on the list and then later down the page, use < a name="state1">State< /a> . This is the basic method I keep finding through Googling.

However, the backend of the site I'm working on doesn't seem to like that method. For the first part, it tells me:
Quote:
Originally Posted by Site
"Illegal attribute value
Make sure that the attribute value is spelled correctly and conforms to the expected type.

Attribute values often need to be of a certain type, e.g. a URL, an integer number etc. "
and for the second part of the code, it says:
Quote:
Originally Posted by Site
"Illegal attributes
Make sure that the attribute is legal for the current HTML element and its name is spelled all lower case.

Each HTML element has its own set of legal attributes[list]. Proprietary attributes invented by browser vendors but not defined in the XHTML specification are not accepted. Some attributes (e.g. id and name) are reserved in the TMS and cannot be used in articles.

As prescribed in the XHTML specification attribute names must be lower case to be recognized by the validator.
"
So apparently I can't even use the name attribute. Any ideas on how to get around this? I did not design the system, and am trying to do my best to work with it.

Thanks.
__________________
Fold for PCMech: Team 13761

Last edited by Alaron; 11-13-2008 at 01:29 PM.
Alaron is offline   Reply With Quote
Old 11-13-2008, 07:00 PM   #2
Barefoot on the Moon!
Staff
Premium Member
 
Force Flow's Avatar
 
Join Date: Aug 2002
Location: Northeastern USA
Posts: 13,385
These are called anchors.

typically...
PHP Code:
<body>
     <
a name="pagetop"></a><!-- this is the anchor, or the place you want to jump to.  Note there is no text within the tag like a normal href link -->
     <
p>blah blah blah blah</p>
     <
a href="#pagetop">Go to Top</a> <!-- this is what you click to jump to the anchor -->
</
body

I think you're missing the # symbol in your link


By the way, what doctype are you using?
__________________
There are two secrets to staying young, being happy, and achieving success. You have to laugh and find humor every day, and you have to have a dream.

Last edited by Force Flow; 11-13-2008 at 07:03 PM.
Force Flow is offline   Reply With Quote
Old 11-13-2008, 09:47 PM   #3
Kickin' it
Staff
Premium Member
 
Alaron's Avatar
 
Join Date: Jan 2002
Location: USA
Posts: 7,723
Send a message via AIM to Alaron
Thanks FF. I did try the above with the # symbol too.

When I put in your code, my site 'Validator' says that I have an 'illegal URL in href attribute'.

It then shows the HTML code and has changed the code to < a href="kupuempty.php?dir=ltr#pagetop" rel="internal" >

As for the doctype, I honestly do not know. There is a basic builder in which I can edit text, but I can also go into the HTML code and edit it directly as I've been trying to do. I'm not simply uploading .html files though. Its called their "Template Management System".

EDIT:

After discussing this with FF further and having little luck with the stubborn system, I'll have to get back to this another time.

Last edited by Alaron; 11-13-2008 at 10:17 PM. Reason: Followup
Alaron is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 07:39 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2