0

I want to open new page in place of existing page I use this

 window.open('EmployeeTraining.aspx?searchkey=' + $("[id$='txtSearchVotes']").val(), '_self', false);

but its not working

Any Idea Is I am using correct this code

2
  • any error you are getting in the console? Commented Sep 30, 2013 at 9:15
  • HTML1524: Invalid DOCTYPE. The shortest valid doctype is "<!DOCTYPE html>". Commented Sep 30, 2013 at 9:23

2 Answers 2

1

Just assign a new value to the location property.

location = "new url"

Sign up to request clarification or add additional context in comments.

4 Comments

var url = 'EmployeeTraining.aspx?searchkey=' + $([id$='txtSearchVotes']").val(); location = url
We have no way of telling how your case is different.
@Quentin whats the differnce between location and locaiton.href
@bhb — For the purposes of this question, nothing. See MDN for a more in depth explanation.
0
document.top.location = "url";

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.