•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Java section within the Software Development category of DaniWeb, a massive community of 426,434 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,330 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Java advertiser: Lunarpages Java Web Hosting
Views: 1119 | Replies: 0
![]() |
•
•
Join Date: Jun 2005
Posts: 29
Reputation:
Rep Power: 4
Solved Threads: 3
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.
Attempted Code for Javascript....
I have tried many variations.
Anyone got any ideas?
Thanks in Advance
Zoned.
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.
![]() |
•
•
•
•
•
•
•
•
DaniWeb Java Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Problem opening notepad through webpage (HTML and CSS)
- Javascript Problem.... (JavaScript / DHTML / AJAX)
- Javascript Problem with Firefox (JavaScript / DHTML / AJAX)
- Using "variable variables" in Javascript (JavaScript / DHTML / AJAX)
- Need help with coolsearch.biz problem (again) (Viruses, Spyware and other Nasties)
- Page Cannot Be Displayed & javascript:doNetDetect() Errors (Viruses, Spyware and other Nasties)
- IE 6 Problem (Web Browsers)
- IE Refresh problem, startnow.com causing problems (Web Browsers)
Other Threads in the Java Forum
- Previous Thread: Please help
- Next Thread: PageFormat


Linear Mode