Window.Open POST

You cannot trigger a javascript popup and then force a post request. Three options: Trigger a POST form with target=”_blank” using javascript (but this doesn’t allow you to disable interface elements such as the menu bar). Open a popup locally, but don’t specify a url. Use the result of window.open to alter the document to … Read more

window.open() on a multi-monitor/dual-monitor system – where does window pop up?

Result of “window.open dual-screen” search revealed this fancy nugget: Dual Monitors and Window.open “When the user clicks on a link that opens a new window using window.open. Make the window appear on the same monitor as its’ parent.” // Find Left Boundry of the Screen/Monitor function FindLeftScreenBoundry() { // Check if the window is off … Read more

How to set a file name using window.open

You can achieve this using the download attribute for <a> elements. For example: <a href=”https://stackoverflow.com/questions/7034754/1251354216241621.txt” download=”your-foo.txt”>Download Your Foo</a> This attribute indicates that the file should be downloaded (instead of displayed, if applicable) and specifies which filename should be used for the downloaded file. Instead of using window.open() you could generate an invisible link with the … Read more

Why is window.showModalDialog deprecated? What to use instead?

Why is window.showModalDialog deprecated? From http://tjvantoll.com/2012/05/02/showmodaldialog-what-it-is-and-why-you-should-never-use-it/, In general the idea of putting a native dialog implementation into the browser was a really good idea, but window.showModalDialog was a bad implementation that is riddled with issues and poor browser support. (…) Note that (…) [a modal dialog using showModalDialog] is a full HTML document, not a … Read more

window.open with headers

Can I control the HTTP headers sent by window.open (cross browser)? No If not, can I somehow window.open a page that then issues my request with custom headers inside its popped-up window? You can request a URL that triggers a server side program which makes the request with arbitrary headers and then returns the response … Read more

tech