[jquery] How do I open a new window using jQuery?

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?

This question is related to jquery

The answer is


This works:

myWindow = window.open('http://www.yahoo.com','myWindow', "width=200, height=200");

It's not really something you need jQuery to do. There is a very simple plain old javascript method for doing this:

window.open('http://www.google.com','GoogleWindow', 'width=800, height=600');

That's it.

The first arg is the url, the second is the name of the window, this should be specified because IE will throw a fit about trying to use window.opener later if there was no window name specified (just a little FYI), and the last two params are width/height.

EDIT: Full specification can be found in the link mmmshuddup provided.