www.webdeveloper.com
Results 1 to 7 of 7

Thread: Linkage

  1. #1
    Join Date
    Nov 2002
    Location
    Aberdeen, Scotland
    Posts
    10

    Linkage

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

  2. #2
    Join Date
    Nov 2002
    Location
    Pretoria : South Africa
    Posts
    12
    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.

  3. #3
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,278
    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>

  4. #4
    Join Date
    Nov 2002
    Location
    Pretoria : South Africa
    Posts
    12
    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...

  5. #5
    Join Date
    Nov 2002
    Location
    NY, USA
    Posts
    731
    <input type="button" value="Men's Single" onClick = "http://www.sasports.co.za/WJC02.html">
    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>
    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>
    Why and where does www.W3.org fit ? ( the pages on my server are : WJCmsd.html / WJCmxd,html ect...
    They were not referring to any pages on your server. It was just an example.

  6. #6
    Join Date
    Nov 2002
    Location
    Pretoria : South Africa
    Posts
    12

    Talking

    Great ! Thanks. It make sence.

    Once again...it you don't ask...you'lle never know.

  7. #7
    Join Date
    Nov 2002
    Location
    England
    Posts
    275
    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles