Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
    Bookmark Topic Watch Topic
  • New Topic

How do I redirect to a specific URL?

 
Joe Kang
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Report post to moderator
I am running a Java application using Tomcat 6 and JBoss 5.1. I've created an URL redirection function using Java Elements addHtml() function (javascript). Well, I am able to alert the URL of current browser (alert(window.location.href)) but I am not able to redirect to a specific URL (window.location.href = 'URL'). The code shown as below:



At the same time, the IE status bar is processing http://www.google.com but somehow it does not redirect me to the page. Help needed. Thanks in advance =)
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Report post to moderator
Closing this duplicate. Continue the discussion there.
 
    Bookmark Topic Watch Topic
  • New Topic