How do I open a new window using jQuery?
jquery
Solution
Those are by no means the same. The first will simply send you to whatever URL you have assigned to window.location.href (in the same window you're currently in). The second makes a GET AJAX request.
Try this page: http://www.codebelt.com/jquery/open-new-browser-window-with-jquery-custom-size/
It gives a great example on how to open a new window*.
If you wish to use raw javascript then this is what you're looking for:
window.open(URL,name,specs,replace)
As seen in http://www.w3schools.com/jsref/met_win_open.asp
Problem
I have the following two ways suggested to me. ``` window.location.href = '/Administration/Notes/Create?dsValue=a&selectAnswer=b'; $.get("/Administration/Notes/Create", { dsValue: dsValue, selectedAnswer: answer }); ``` Are these methods the same? Which one would be the best for me to use and what's the difference between the two?