/    Sign up×
Community /Pin to ProfileBookmark

How do you link two pages in a website together? I want to have links on my main page to other sub-pages.

to post a comment
HTML

6 Comments(s)

Copy linkTweet thisAlerts:
@hennievNov 21.2002 — Well, you can create a button :

<input type="button" value="Men's Single" onClick = "http://www.sasports.co.za/WJC02.html">

or text

<a href='http://www.sasports.co.za/badminton.html'>Badminton</a>

Hope it help.
Copy linkTweet thisAlerts:
@CharlesNov 21.2002 — Except that your button method,

<input type="button" value="Men's Single" onClick = "http://www.sasports.co.za/WJC02.html">

will not work on a lot of browsers. Use instead:

<form action="http://www.w3.org/">

<p>

<input type="submit" value="The W3C">

</p>

</form>
Copy linkTweet thisAlerts:
@hennievNov 21.2002 — Please help me. If you say it won't work from other browsers... way?

Recently, the World Junior Badminton Championships were hosted in SA. The International Fedaration sent me the results in html format. I created a button and text to the results on that coding. Please if someone can check if it works...I'e appreciate.

Why and where does www.W3.org fit ? ( the pages on my server are : WJCmsd.html / WJCmxd,html ect...
Copy linkTweet thisAlerts:
@jeffmottNov 21.2002 — <input type="button" value="Men's Single" onClick = "http://www.sasports.co.za/WJC02.html">[/QUOTE]

This won't work on any browser. Just a URI is not valid JavaScript and will throw an error.

[CODE]<button onclick="window.location='http://www.site.com/path/'">Label</button>[/CODE]

But then this still won't on every browser since many people disable JavaScript while other browsers simply don't support it.

A standard link is the best way to go.

[CODE]<a href="http://www.site.com/path/">text</a>[/CODE]

Why and where does www.W3.org fit ? ( the pages on my server are : WJCmsd.html / WJCmxd,html ect...[/QUOTE]

They were not referring to any pages on your server. It was just an example.
Copy linkTweet thisAlerts:
@hennievNov 21.2002 — Great ! Thanks. It make sence.

Once again...it you don't ask...you'lle never know.?
Copy linkTweet thisAlerts:
@Rick_BullNov 21.2002 — Yeah definately, I and probably a lot of people have learnt a lot about accessibilty from the guys at the HTML Goodies board. And JavaScript is something you have to be careful with if you want to cater for everyone ?
×

Success!

Help @Denzil_01224 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 2.22,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Samric24,
tipped: article
amount: 1000 SATS,

tipper: Anonymous,
tipped: article
amount: 10 SATS,

tipper: @neststayhome,
tipped: article
amount: 1000 SATS,
)...