Setting Window Name(title) dynamically for a pop up window
Hi,
I have a requirement to open a pop up on a click of link, which will open a document(can be anything like .txt, .doc,.pdf etc) from an external url. This functionality is implemented by using a html control where on click of the link a javascript function is invoked which inturn invokes the openurlinwindow function. Code snippet as given below
var NewWin = openUrlInWindow(externalurl, "NewDoc",PopupWindowFeatures);
Now this works fine except that the url is displayed in the title bar by default and the user wants it displayed by the document name. I have tried setting the Document name value to the html title property as per below but it is not reflected in the title bar.
NewWin.document.title = Document Name;
I have also tried some other approaches like setting a delay and executing the above expression after the document is loaded, also tried to open the url in a specific frame in the html page but none of it seems to work, if anyone has any idea on how to implement this or has faced a similar issue please help with this.
Thank you for your time.