File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes How do I redirect to a specific URL? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply locked New topic

How do I redirect to a specific URL?

Joe Kang

Joined: Oct 06, 2010
Posts: 2
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 but somehow it does not redirect me to the page. Help needed. Thanks in advance =)
Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

Closing this duplicate. Continue the discussion there.

[My Blog]
All roads lead to JavaRanch
I agree. Here's the link:
subject: How do I redirect to a specific URL?
jQuery in Action, 3rd edition