www.webdeveloper.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2011
    Posts
    3

    links to working

    I have simple HTMl and javascript links that do not work on one side of the page. They only work in firefox. help?

    [a class="pricelink" href="#top" onclick="price('audio','tshmedia','3')"]FREE[/a]

  2. #2
    Join Date
    Nov 2011
    Posts
    47
    should be

    <a class="pricelink" href="#top" onclick="price('audio','tshmedia','3')">FREE</a>

    Also something has to have the name "top" defined in your html document somewhere.

  3. #3
    Join Date
    Nov 2011
    Posts
    3
    Quote Originally Posted by nacort View Post
    should be

    <a class="pricelink" href="#top" onclick="price('audio','tshmedia','3')">FREE</a>

    Also something has to have the name "top" defined in your html document somewhere.
    it does.
    <div id="top"></div>
    <div id="featured"><div class="featureditem"></div><div class="featureditem"></div><div class="featureditem"></div></div>
    <div id="libraryitems">
    <div class="libraryitem">November 25, 2011 - Steve Price (Audio - 00:54:43)<p class="price" id="audiotshmedia3"><a class="pricelink" href="#top" onclick="price('audio','tshmedia','3')">FREE</a></p></div>
    </div>

  4. #4
    Join Date
    Nov 2011
    Posts
    47
    <div id="top"></div>

    This is just creating a div that looks in your css for a refernce to a top id.

    You need to add a anchor tag

    <a id="top"></a>

    or

    <a name="top"></a>

    per the link below name is deprecated and id should be used. But it needs to be in a anchor tag

    http://www.w3schools.com/tags/att_a_name.asp
    Last edited by nacort; 11-26-2011 at 08:46 PM.

  5. #5
    Join Date
    Nov 2011
    Posts
    3
    I did that. But the thing is it doesn't even acknowledge the link. Like the cursor icon doesn't change or anything.

  6. #6
    Join Date
    Nov 2011
    Posts
    47
    Your only going to notice a difference if the page is long enough to scroll and the link is on another part of the page.

  7. #7
    Join Date
    Mar 2011
    Location
    Rome, Italy
    Posts
    96

    Maybe a JS syntax problem

    There's a "price" JS function, I don't know the JS content, but the cause could be a JS syntax problem...

    instead of
    onclick="price('audio','tshmedia','3')"
    try:
    onclick="price('audio','tshmedia',3)"

    Maybe the last variabile has to be implemented as numeric?

Thread Information

Users Browsing this Thread

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

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
  •  
HTML5 Development Center



Recent Articles