window.location
Unable to redirect to the page using window.location of javascript for the code given below
<script language="javascript">
function confirmation() {
var answer = confirm("Do you want to add more Bussess?")
if (answer){
}
else{
alert("Thanks for using Bus Entry form")
window.location = "adminHomePage.jsp"
}
}
Anyone can tell me the reason for this.?
i have asready tried full path of the file
Related Article: window location using frames
is a solved JavaScript / DHTML / AJAX discussion thread by stupidenator that has 11 replies and was last updated 2 years ago.
nikita.chandra
Junior Poster in Training
69 posts since Aug 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0
1. You neglected to end each line with a ;
You don't need to end it with ';' anymore unless you are trying to code it in 1 line. :)
Taywin
Posting Maven
2,633 posts since Apr 2010
Reputation Points: 275
Solved Threads: 375
Skill Endorsements: 17
Nikita,
If you want to build/manipulate Locations then you might like to try my LOCATION constructor:
http://www.daniweb.com/code/snippet217388.html
It is quite well documented and probably overkill for what you want but maybe useful to remember for the future.
Airshow
Airshow
WiFi Lounge Lizard
2,782 posts since Apr 2009
Reputation Points: 370
Solved Threads: 388
Skill Endorsements: 9