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

Need to remove javascript:void(0) in mouseover status bar on Wordpress theme

Discussion in 'HTML & JavaScript' started by ThreadKiller, Dec 2, 2013.

  1. ThreadKiller

    ThreadKiller Power Member

    Joined:
    Jan 31, 2012
    Messages:
    628
    Likes Received:
    305
    Location:
    Never too long in one place.
    Hey all.

    Bear with me cause I am not a programmer.

    Building an amazon site using the same theme these guys do: chiacloud dot com

    Now hover over one of those thumbnails. The status bar shows javascript:void(0) and the click takes you directly to Amazon. That would probably be a violation of Amazon policy regarding cloaked links, so I need to fix this on my site.

    The code that seems to handle this is in index.php. It goes like this:
    Code:
    <div class="<?php if($j=="0") {echo "rightitem";} else    {echo "homeitem";}?>"><a href="<?php the_permalink(); ?>"><?php the_title2('', '', true, '20'); ?></a><br />
    <?php include("small-thumbnail.php"); ?>
    <div class="harga"><?php include("price.php"); ?></div>
    <a class="buy" href="javascript:void(0);" onclick="window.open ('<?php include("alink.php"); ?>','_blank')" rel="nofollow"><img src="<?php bloginfo('template_url'); ?>/images/shopping_basket.png" align="left" />ADD  TO CART</a>
    </div>
    How do I change this to show the true URL on Amazon? Or if you have any other ideas I'd be happy to hear it.
     
  2. Defecate

    Defecate Registered Member

    Joined:
    Oct 24, 2013
    Messages:
    66
    Likes Received:
    9
    Try this
    Code:
    <a class="buy" href="<?php include("alink.php"); ?>" target="_blank" rel="nofollow"><img src="<?php bloginfo('template_url'); ?>/images/shopping_basket.png" align="left" />ADD  TO CART</a>