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){

		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

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. :)

Which he is not on line 11 + 12

But yes you are right, you can code in one line:

if (x == 0) { x++ }

But doens't this look nicer :)

if (x == 0) { x++; }


This article has been dead for over six months. Start a new discussion instead.