Home
Friday, March 24, 2017
11:05:29 AM
Users online: 0   You are here >> Home > Web Design

Forums | Web Design Forums search
Forum FAQ
   
  1  
Simple but urgent HTML question
millionmice 
17/5/08 11:44:05 PM
Overlord

I'm trying to make a webpage that will work out of a folder. Now, I'm stuck using .mht files (word web pages). Is there a way to make the links relative to the folder they are in, and not their path on my PC? I've tried editing them in wordpad, but I haven't touched HTML in years.

I know, stupid situation, it's for a friend who has been forced into it by a retarded lecturer who has no IT qualifications, but thinks a 10,000 word web page would be 'nice'. Worse still "I always use word for webpages" aarrrgh!

Help much appreciated.


Edited by millionmice: 17/5/2008 11:49:50 PM

-----
Moltar: That is fascinating! (music starts again) Thom Yorke, you are very very interesting, and very very perceptive!

Thom Yorke: Really..

Moltar: So interesting and so perceptive that I think we will now fight with knives.

superfireydave 
18/5/08 12:03:28 AM
Titan

Uh.
What?

If you can give me an example of the link, that'd be sweet.
Usually you link to stuff like this:

 
<a href="document.html">link title</a>


And that's all you have to do to link to a document in the same folder.

And anyone who uses word should be shot dead for trying to make a web page in it. Frontpage is horrid as it is, word is just fucking scary.

-----
Mreow?

linke 
18/5/08 12:05:46 AM
Guru

If you want to edit them in wordpad, which is probably easiest.

The HTML for a link is

 
<a href="path to file">Link Text</a>


So if it's

 
<a href="C:/Documents .../folder/file.extension">Link Text</a>


If it's in your root folder make it

 
<a href="file.extension">Link Text</a>


If it's in a subfolder of the root folder make it

 
<a href="subfolder/file.extension">Link Text</a>




-----
If you're not part of the solution, you're part of the precipitate.

millionmice 
18/5/08 12:09:37 AM
Overlord

</v:shapetype><v:shape id=3D"_x0000_s1044" type=3D"#_x0000_t202"
href=3D"diapason%20concerts%20prochains.mht"
style=3D'position:absolute;margin-left:19.5pt;margin-top:576.75pt;width:18=
0pt;
height:27pt;z-index:4' o:button=3D"t" fillcolor=3D"maroon" stroked=3D"f">

directs me to C:\0C6C218C\diapason concerts prochains.mht

If I remove the path in word (as opposed to changing the HTML code) the path remains in the code but vanishes from word.

-----
Moltar: That is fascinating! (music starts again) Thom Yorke, you are very very interesting, and very very perceptive!

Thom Yorke: Really..

Moltar: So interesting and so perceptive that I think we will now fight with knives.

superfireydave 
18/5/08 12:11:23 AM
Titan

Jesus fucking christ.

Are you not able to do the webpage properly? I'm happy to assist if you're having difficulties =

Basically, change the href bit to href="diapason%20concerts%20prochains.mht" and it should be fine (e.g. will link locally)

-----
Mreow?

millionmice 
18/5/08 12:19:49 AM
Overlord

I tried that, if I remove the 3D I lose a couple of characters from the link.

By the look of it I'll have to relearn frames and do it from scratch........ The things I do for my friends......

Cheers for the shock at seeing word code, at least I know I'm not as ignorant as I assumed.

-----
Moltar: That is fascinating! (music starts again) Thom Yorke, you are very very interesting, and very very perceptive!

Thom Yorke: Really..

Moltar: So interesting and so perceptive that I think we will now fight with knives.

superfireydave 
18/5/08 12:33:16 AM
Titan

Dude, I think I'd tell my friend to do it on their own if they approached me with code from MS word.

FTR frames aren't a great idea in the scope of things either really, but if you've got limited time and it's only for Uni then use of frames and tables is okay I guess =P

-----
Mreow?

millionmice 
18/5/08 12:42:04 AM
Overlord

Yeh, we've decided links are not part of a French subject, so it's being handed in sans working links. Of course another loony lecturer has the same idea and is marking on links. So if anyone wants to bomb UTS now's a good a time as any :P

-----
Moltar: That is fascinating! (music starts again) Thom Yorke, you are very very interesting, and very very perceptive!

Thom Yorke: Really..

Moltar: So interesting and so perceptive that I think we will now fight with knives.

linke 
18/5/08 12:44:06 AM
Guru

I was just having a look at a test page I did in word, and at the top of the page was the line
 
Content-Location: file:///C:/268BA2D4/test.htm


changing that to
 
Content-Location: test.htm


made the links realtive to the document location.


Edited by linke: 18/5/2008 12:44:36 AM

-----
If you're not part of the solution, you're part of the precipitate.

.:Cyb3rGlitch:. 
18/5/08 9:50:28 AM
Titan

Quote by millionmice
Yeh, we've decided links are not part of a French subject, so it's being handed in sans working links. Of course another loony lecturer has the same idea and is marking on links. So if anyone wants to bomb UTS now's a good a time as any :P


Thanks, I've officially taken UTS off my University list. :)

-----
Cyb3rGlitch Tutorials: http://www.cyb3rglitch.com/
Tutorials for the aspiring beginner.

moofactory 
19/5/08 9:13:28 AM
Titan

The lecturer is a dick.
you can quote me on that by showing him this thread.

Dont use wordpad. use notepad, Word pad will no doubt generate unwanted code, besides all this, if its local.. why must it be a web page? a 10k word essay... put it in a word doc or pdf and tell the lecturer to take it or shove it up his ass.

They shouldnt be dictating the format its to be given in.

-----
Quote by Ben Mansill
I've always waited for the day here when we talk about anal sex with animated Disney lions.

Master_Scythe 
19/5/08 12:35:24 PM
Titan

If you need MHT files, Opera can generate them.

Create the webpage in a WYSIWYG editor (download frontpage express for god sake, its free).

Finish up your webpage, open in opera, file -> save as -> web archive

how hard can this be?

-----
4200+X2 939, ASUS A8N-SLI-D, Ati HD3850, 1gb,1tb total HDD, 109 DVD, LG DVD-rom.
Quote by Girvo
I've got a wicked tiny one that is ridiculously sensitive.



Doctor Orange 
26/5/08 11:46:49 PM
Titan

EDIT - wrong thread, sorry.


Edited by Doctor Orange: 27/5/2008 02:03:13 AM

-----
http://www.freerainbowtables.com/

nicephotog-jvm.net 
9/6/08 8:58:50 PM
Master

quote moofactory: ..."Dont use wordpad. use notepad, Word pad will no doubt generate unwanted code"...

Want unwanted code? just declare the content-type with the wrong charset encoding scheme and do not refactor (the int to byte).
Always give it a hand in the head tag for HTML4.01 with the lang=en
or xml:lang="en" in the html tag for XHTML.

The URL he has for his .mhtml is "URL encoded", you need to comprehend what that means.
You also need to comprehend an "assumed '''relative''' URL/URI".
a-page: http://www.site.com/apage.html
link-to-same directory:
anotherpage.html

link-to-nextdirectory(in apage.html):
http://www.site.com/nextdirectory/bpage.html

link-to-somepage-in-nextdirectory-from-bpage.html:
somepage.html
(note their is no requirement for same domain and directory to be present by assumed location)


If the DTD declaration at the top is for HTML4.01 or XHTML transition 1.0 e.t.c.
then you need only change the link value(k,v) to a URL in the same folder by
naming only the file
or
by naming the full path e.g.
http://somesite.com/thefile.html (note you may as well re-name the file
.html or .htm [1.0http case sensitive 1.1non-case-sensitive]).


Edited by nicephotog-jvm.net: 10/6/2008 06:50:38 PM

-----
NIN - Reptile (Reciprocating Marine engine)

  1  
Forums | Web Design