I want to open a new window using:
window.open('<myfile>.pdf','my window','resizable,scrollbars');
The new window opens, but I do not get the title of the window as 'my window'. What could be going wrong?
Typically the onclick event on the "Yes" or "Ok" button in the modal dialog looks like this: window. returnValue = true; window. close();
When window. open() returns, the window always contains about:blank . The actual fetching of the URL is deferred and starts after the current script block finishes executing. The window creation and the loading of the referenced resource are done asynchronously.
The open() method opens a new browser window, or a new tab, depending on your browser settings and the parameter values.
var winFeature = 'location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes'; window. open('Result. html','null',winFeature); In many solutions, just the location=no attribute can hide the address bar (in both IE & Chrome).
If domain is same then you can change the title of new window
<script type="text/javascript"> var w = window.open('http://localhost:4885/UMS2/Default.aspx'); w.document.title = 'testing'; </script>
Here is my solution, please check this out:
var myWindow = window.open('<myfile>.pdf','my window','resizable,scrollbars'); myWindow.document.write('<title>My PDF File Title</title>');
Hope I could help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With