Hi all,
I have spent a long time trying to get this sorted. I have searched high and low to get an answer. I hope one of you experts can help :mrgreen:
I have a gif on a webpage (a chinese flag).
When someone clicks on the gif they are brought off to Babalfish for a translation of the page. This works fine. EXCEPT.
Instead of hardcoding each URL e.g. www.mysite.com/news.htm into the gif link I tried to use a piece of Javascript that shows the URL of the page. This means that I can put this code on my web page template and I will not have to hardcode the URL.
Original Code for gif link.
<a href="http://babelfish.altavista.com/babelfish/trurl_load?url=http%3A//www.mysite.com/&lp=en_zh"><img src="http://www.mysite.com/images/flags/cn.png" alt="Simplified Chinese" width="25" height="15" border="0"></a>
Attempted Code for Javascript....
<script language="JavaScript">
<!--
document.write (location.href)document.write ("<p>")
document.write ("<a href='"+location.href+"'>Link To Current Page</a>")
document.write ("<a href=http://babelfish.altavista.com/babelfish/trurl_load?url="+location.href+">Here</a>")
// -->
</script>
I have tried many variations.
Anyone got any ideas?
Thanks in Advance
Zoned.