1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[QUESTION] Javascript Text Links??

Discussion in 'White Hat SEO' started by deth_by_uv, Sep 26, 2008.

  1. deth_by_uv

    deth_by_uv Power Member

    Joined:
    Feb 26, 2008
    Messages:
    521
    Likes Received:
    411
    I'm working on a client's site that runs on a corporate site builder type of deal and a lot of the sites functions runs Javascript...which I am no expert at...

    I was trying to add anchor text links for some on-page SEO and realized that the built in editor wasn't capable of making links to other pages, how stupid is that?...I thought that was a pretty critical thing...

    So I found some code on the net which takes care of the job fine enough:

    <a name="" onClick="window.open('http://javascript.internet.com/new')">Click Here</a>

    The code above for text link works, opens page in a new tab and all, but it doesn't turn the text blue like in HTML and I was just wondering if search engines cared whether or not the text links were in HTML or Javascript?...

    Appreciate any help...
     
  2. foxler

    foxler Regular Member

    Joined:
    Mar 7, 2008
    Messages:
    279
    Likes Received:
    159
    To my knowledge search engines don't get along with anything javascript, so they won't be crawling through the pages that those links link to.

    The editor let you put in
    Code:
    <a name="" onClick="window.open('http://javascript.internet.com/new')">Click Here</a>
    but not
    Code:
    <a name="" href="http://javascript.internet.com/new">Click Here</a>
    ? Thats a bit odd as they are basically the same code but the latter one is easier for search engines to crawl through.
     
  3. deth_by_uv

    deth_by_uv Power Member

    Joined:
    Feb 26, 2008
    Messages:
    521
    Likes Received:
    411
    Yeah, that stupid editor is really chafing my balls...when I tried using the second, friendlier code, the editor won't save but with the javascript code it saves just fine...oh well :) ...
     
  4. BlackSmack

    BlackSmack Junior Member

    Joined:
    Jul 13, 2008
    Messages:
    149
    Likes Received:
    47
    Occupation:
    Whale Tail Watcher
    Location:
    Uranus
    I'm an affiliate for some chafing cream I'll hook you up :D
     
  5. scriptkiddy

    scriptkiddy Junior Member

    Joined:
    Jan 11, 2008
    Messages:
    104
    Likes Received:
    18
    A while ago I did something like this:

    onClick="javascript:redirect('http://site.com/page')"

    I secifically didn't want google to spider the page but in fact they did !

    Of course it's not the way to do it if you want to encourage spider visits, but it doesn't stop them.