A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Java EE 7 Tutorial Volume 1 or Volume 2
this week in the
jQuery UI in Action
Ajax - I want to open a URL in the same window . how can i do that ?
Joined: Sep 15, 2011
Nov 02, 2011 07:21:12
I want to navigate to the url as I click on the 'Go' link on my existing page.
I am using jsp and ajax.
The code I have written is :
ajaxRequest.open("GET", "someContextRoot/hardcodedPath.do?customerName=" + custName + "&customerID=" + custID, false);
<a href="#" onclick="launchURL();">Go</a>
The URL getting built is correct but I am not able to load the URL page on the same window.
How can I do that ?
Author and ninkuma
Joined: Jan 10, 2002
Nov 02, 2011 08:14:44
Don't use Ajax for that. The whole point of Ajax is to
replace the current page. If you want a "normal" submission that replaces the current page, use a "normal" hyperlink or form submission.
Asking smart questions
Books by Bear
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
subject: Ajax - I want to open a URL in the same window . how can i do that ?
Trigger action on combo change
passing the values from popup window to jsp
registration page using jsp and ajax
pass <bean:write> to a function
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014