Hi y'all, The code works in firefox but doesn't seem to work in IE. Can anyone see the problem? Thanks. <script type="text/javascript"> document.write("<table border=0 width=407 height=41>") document.write("<tr>") document.write("<td>") document.write("<p align=left>") document.write("<a href=") document.write(document.referrer) document.write(">") document.write("<font color=#686964 face=Trebuchet MS size=2>") document.write(document.referrer) document.write("</font></a></td></tr></table>") </script>
Do you have it in the HEAD tags? I prefer to load javascript in the head tags, then only call them through a function when needed... Also, I'd recommend using semi-colons at the end of every line... I edited your code, the way that I would do it... <html> <head> <title>hi</title> <script type="text/javascript"> <!-- function showbacklink(){ document.write("<a href='"); document.write(document.referrer); document.write("'>Referrer</a>"); } --> </script> </head> <body> <table border=0 width=407 height=41> <tr> <td> <p align=left> <font color=#686964 face=Trebuchet MS size=2> <script type="text/javascript"> <!-- showbacklink(); --> </script> </font></a></td></tr></table> </body> </html> HTML: Tested it, and it works fine in IE and FF for me...
Thanks. It works on my server, too. Hopefully it'll work on my work's server (running MIVA). Thanks again.