I'm trying to show a certain link on my status bar and when the person clicks it it goes to a different one.

The code I've put so far is this:

Code: 
 <script language="javascript" type="text/javascript">
     function redirect(URL)
     {
       document.location=URL;
       return false;
     }
    </script>

<center><h2><a href="http://www.showthislink.org/download/<?php the_title(); ?>.zip" onclick="return
redirect('http://www.gotothislink.com') rel="nofollow"><font color="FF0000"> Click Here to Download <?php the_title(); ?></font></center></a></h2>
This is how it looks on my single.php page in wordpress.

I dont know much about coding, I just search google and read about code that I want to to use. Do I have to put any special code on the top of the page to let it know that I'll be using javascript later?


ADDED: I got the code above from this site:
Code: 
http://roshanbh.com.np/2008/08/different-status-bar-text-hyperlink-mouseover.html


---------- Post added at 05:05 PM ---------- Previous post was at 03:56 PM ----------

I guess I have to put them in "echo" tags?

How do I do this, and where on the code should I add them?
thizzladen Reviewed by thizzladen on . How to do this in javascript/php? I'm trying to show a certain link on my status bar and when the person clicks it it goes to a different one. The code I've put so far is this: <script language="javascript" type="text/javascript"> function redirect(URL) { document.location=URL; return false; } Rating: 5