Click to See Complete Forum and Search --> : Title of Modal Dialog


itspiyushgupta
11-04-2003, 05:32 AM
Hi Forum,

Can anyone tell me way to change title of a modal dialog using scripting?

Thanks.

Khalid Ali
11-04-2003, 10:32 AM
use the window handle to make changes

var win = window.open();
win.document.title="new title";

itspiyushgupta
11-04-2003, 11:03 PM
Hi,

"document.title" doesn't seem to work when window is opened using window.showModalDialog() function.

Has anyone changed title of a "Modal Dialog" using javascript?

Khalid Ali
11-05-2003, 07:24 AM
show me the code...

fredmv
11-05-2003, 07:55 AM
The title of the modal dialog is the result of the HTML <title> tag. However, I believe Khalid Ali is using the correct code to change the title of a modal dialog window through JavaScript. There's only one difference: inside of the actual page you are displaying inside of the modal dialog, use his code there. For example, if you were opening a file called foo.html, you would have code that looked something like this inside of it:<script type="text/javascript">
document.title = "Hello, World.";
</script>I hope that clears things up for you.