Results 1 to 5 of 5

Thread: going to new page with Javascript links..

  1. #1
    Join Date
    Oct 2009
    Posts
    25
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Exclamation going to new page with Javascript links..

    hey all.

    I am new to javascripting, and it's confusing to a beginner!

    I am using a Dreamweaver preset template that has javascript for the links.

    yet, I can't figure out how to make the links go to another page! It does nothing when clicked and I think I entered in the code wrong to direct it to the page requested.

    note: pages aren't up as of now. I believe it should at least give you a page error when clicked on the link. (if it does work, it'd probably take you to an old page that I am revising)

    http://warrenvillerailroad.com/index4.html

    I tried different variations, but its probably something completely different from what I was trying.

  2. #2
    Join Date
    Oct 2009
    Posts
    845
    Thanks
    14
    Thanked 189 Times in 188 Posts

    Default

    Did you try just changing it from this;
    <a href="javascript:;about.html">About WarrenVille</a>
    to this
    <a href="http://warrenvillerailroad.com/about.html">About WarrenVille</a>

  3. The Following User Says Thank You to azoomer For This Useful Post:

    pencil2print (06-26-2010)

  4. #3
    Join Date
    Oct 2009
    Posts
    25
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    it seemed to work, i think. lol

    I thought if I took out the javascript:; section, it'd lose the script effects

  5. #4
    Join Date
    Oct 2006
    Location
    New York, NY, USA
    Posts
    260
    Thanks
    42
    Thanked 24 Times in 24 Posts

    Default Some interesting aspects

    Right!– If you just want to link to a page, use standard HTML <a href="indexPage.html">click link </a>. But calling a JavaScript function from an HTML <a href="#nogo"> link </a> can have some interesting aspects. I forget the term -- "JavaScript link"?

    For instance, I call an open pop-window function to give viewer some source info without sending them away from site (http://www.chanit.com, http://www.jacquimorgan.com, http://www.josephdenaro.com)'



    Code:
     <p class="footnote"> CREDITS: &nbsp; (1) Web design & animation by Denise deGoumois <a href="javascript:myopen('http://www.auntnini.com')">http://www.auntnini.com</a><br>
    (2) Omni Image View, Fade, and/or Slide (&quot;vfs&quot;) Script ©2008 <a href="javascript:myopen('http://home.comcast.net/~jscheuer1/side/vfs/vac_plain.htm')">John Davenport Scheuer</a> as discussed at <a href="javascript:myopen('http://www.dynamicdrive.com/forums/showthread.php?t=43787')">Dynamic Drive Forums</a></p>
    Here are some links I found on the subject (maybe not the best):

    "Using HREF JavaScript Links" http://computerprogramming.suite101....vascript_links

    "Using Link Tags with JavaScript" http://www.pageresource.com/jscript/jlinktut.htm

    "HREF for Javascript links: “#” or “javascript:void(0)”?" http://stackoverflow.com/questions/1...avascriptvoid0

  6. The Following User Says Thank You to auntnini For This Useful Post:

    pencil2print (06-26-2010)

  7. #5
    Join Date
    Oct 2009
    Posts
    25
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    thanks for the links! I have some reading and learning to do!

Bookmarks

Posting Permissions

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