window.location not working in IE 6

Discussion in 'JavaScript' started by cesarcesar, Jun 12, 2007.

  1. #1
    The following JS script works fine in FF and IE7. It fails though in IE6, which happens to be my target audience.

    Whats failing is.. the window.location is not calling.

    
    function confirmation(text,url_link) {
    	var answer = confirm(text)
    	if (answer){
    		window.location = url_link;
    	}
    
    }
    
    Code (markup):

     
    cesarcesar, Jun 12, 2007 IP
  2. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #2
    window.location.href
    Code (markup):
    is the correct method to use.
     
    krakjoe, Jun 13, 2007 IP