Welcome Guest ( Log In | Register )

      
Discover the best free computer help!
Learn more about Geeks to Go by taking the tour. Spyware, virus, trojan, fake security or privacy alerts? Read the malware cleaning guide.
 
Reply to this topicStart new topic
Help with <a> tag, <a> tag loading wrong directory
Alex_McIntosh
post Apr 21 2008, 04:34 PM
Post #1


Member
***
Posts: 225
OS: XP Home Edition/ Professional



I am trying to build a personal Homepage, i want to also have links to the main sites i go onto... When i am creating a orderd list , i do the following code below... But when i save and open the file in firefox it displays instead in teh address bar

QUOTE
file:///C:/Documents%20and%20Settings/Owner/Desktop/www.geekstogo.com


So i don't know how to cancel that out, there is no file called that in that directory, that isn't even where i am saving the files... :S

QUOTE
<ol>
<li><a href="www.geekstogo.com">GeeksToGo</a></li>
</ol>


That is just an example of what i am using.

Is there anyone that can help me?
Go to the top of the page
 
+Quote Post
Major Payne
post Apr 21 2008, 04:59 PM
Post #2


Trusted Techie
Group Icon
Posts: 4,476
From: FEMA took "Tin Can" away!
OS: Win XP/Vista Home Premium. Backup PC: Commodore 64 with 300 baud modem!



First, do not put your links in an ordered list. Use an unordered list for multiple links. Second, no link should have file:/// or C:/ as part of the path if it is to be used online. Nor should you have spaces or uppercase letters in folder/file names. Especially if using XHTML 1.0 Strict. You didn't mention the HTML Editor you are using or whether you know how to hand code HTML/CSS.

You seem to be saying about saving a file. Or you linking to a file on your web site or to a file on another web site? There's no problem with using full path links as long as the full path reflects the directory structure of your site and not the directory structure of your site on your hard drive. A suggestion: always mirror the directory structure on your hard drive with the one actually online.

Ron

This post has been edited by Major Payne: Apr 21 2008, 05:00 PM
Go to the top of the page
 
+Quote Post
Alex_McIntosh
post Apr 22 2008, 02:16 AM
Post #3


Member
***
Posts: 225
OS: XP Home Edition/ Professional



I'm using notepad, and I know quite extensive HTMl and learning CSS (You know might know it is not hard to learn anyway)

I have never really came across this problem though.

I am using strict or though for what i want transitional might be better, i'll stick to strict for now though...

Would it help if i showed you all the HTML so far?

and i dont know why it has 3 "/" in it, i didnt put them like that... All i want is a anchor tag that will be in a list (Ordered or not) and link to a site so i thought that i have it correct...

Still why is it linking to that path and not the website?

EDIT:Spelling mistakes =]

This post has been edited by Alex_McIntosh: Apr 22 2008, 02:18 AM
Go to the top of the page
 
+Quote Post
Metallica
post Apr 22 2008, 12:33 PM
Post #4


Spyware Veteran
Group Icon
Posts: 20,724
From: Netherlands
OS: XP Pro & Vista Ultimate



Try

<a href="http://www.geekstogo.com">GeeksToGo</a>

By omitting the protocol it looks for a file called "www.geekstogo.com" on your desktop.
Go to the top of the page
 
+Quote Post
Major Payne
post Apr 22 2008, 04:23 PM
Post #5


Trusted Techie
Group Icon
Posts: 4,476
From: FEMA took "Tin Can" away!
OS: Win XP/Vista Home Premium. Backup PC: Commodore 64 with 300 baud modem!



QUOTE (Alex_McIntosh @ Apr 22 2008, 03:16 AM) *
Would it help if i showed you all the HTML so far?
Would like to see it if possible.

and i dont know why it has 3 "/" in it, i didnt put them like that... All i want is a anchor tag that will be in a list (Ordered or not) and link to a site so i thought that i have it correct...

file:/// is the proper way with 3 "/"s to get a file link to work LOCALLY" Somehow the full path was elected to be put in and the editor knows how to do it correctly so it will work. It will not work as an online link as there is no "c" drive there. tongue.gif. You must use http:// for the correct protocol.

Still why is it linking to that path and not the website?

Using
CODE
<a href="http://www.geekstogo.com">GeeksToGo</a>
will only cause a browser to display the GTG page. If no browser open, then clicking on the link locally will cause default browser to open to GTG's page. This will work online and will do the same depending on options set in browser for activated links. (Either a new tab or window will be open.). NotePad does not have the sophistication to insert code for an html file. It is a text editor and it is up to the person writing code to put correct tags and other code on the page before saving it with an htm/html extension.


EDIT:Spelling mistakes =]


No way another editor did some code insertions before you started with NotePad? That could only account for an Option being set to use full paths and not relative paths.

Ron

This post has been edited by Major Payne: Apr 22 2008, 04:26 PM
Go to the top of the page
 
+Quote Post
Alex_McIntosh
post Apr 23 2008, 02:20 AM
Post #6


Member
***
Posts: 225
OS: XP Home Edition/ Professional



I really didnt understand that at all, could you elaborate please?
Go to the top of the page
 
+Quote Post
Major Payne
post Apr 23 2008, 05:09 AM
Post #7


Trusted Techie
Group Icon
Posts: 4,476
From: FEMA took "Tin Can" away!
OS: Win XP/Vista Home Premium. Backup PC: Commodore 64 with 300 baud modem!



Might be better to stick with Metallica's answer then. Without the http:// in your links, the browser is not going to look for anything on the web.

Ron
Go to the top of the page
 
+Quote Post
Alex_McIntosh
post Apr 23 2008, 01:23 PM
Post #8


Member
***
Posts: 225
OS: XP Home Edition/ Professional



I'll give it a go now

Thanks so far wink.gif
Go to the top of the page
 
+Quote Post
Major Payne
post Apr 23 2008, 02:47 PM
Post #9


Trusted Techie
Group Icon
Posts: 4,476
From: FEMA took "Tin Can" away!
OS: Win XP/Vista Home Premium. Backup PC: Commodore 64 with 300 baud modem!



OK. Just didn't want to get into a lot more explanation without actually seeing your code and the actual page9s) online. tongue.gif

Ron
Go to the top of the page
 
+Quote Post
Alex_McIntosh
post Apr 24 2008, 02:10 AM
Post #10


Member
***
Posts: 225
OS: XP Home Edition/ Professional



It's all working now, thanks people! smile.gif

The problem was that it was searching for the file "www.geekstogo.com" but with the "HTTP://" infront of it it looks on the web.

smile.gif

Thanks again smile.gif
Go to the top of the page
 
+Quote Post
Metallica
post Apr 24 2008, 03:32 AM
Post #11


Spyware Veteran
Group Icon
Posts: 20,724
From: Netherlands
OS: XP Pro & Vista Ultimate



thumbsup.gif

Glad we could help.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Collapse

> Similar Topics

    Topic Title Replies / Views Topic Information
No New Posts   5 / 246 23rd November 2005 - 09:04 AM
selrath started - last by phua zheng hao
No New Posts   2 / 1,470 17th April 2006 - 05:13 AM
Allsortgroup started - last by Allsortgroup
No new   16 / 849 12th April 2008 - 10:33 PM
coolcricket started - last by kahdah
No new   14 / 92 Yesterday, 09:21 PM
melkor75 started - last by melkor75

RSS Time is now: 2nd December 2008 - 12:15 AM
Advertisements do not imply our endorsement of that product or service. The forum is run by volunteers who donate their time and expertise. We make every attempt to ensure that the help and advice posted is accurate and will not cause harm to your computer. However, we do not guarantee that they are accurate and they are to be used at your own risk.