View Single Post
  #1 (permalink)  
Old May 25th, 2007, 07:19
nitinmukesh123 nitinmukesh123 is offline
New Member
Join Date: May 2007
Location: india
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Javascript modal dialog title problem

Hi I am facing a problem with setting the modal window title..

source of 1.html

PHP: Select all

<html>
    <
head>
        <
script language="javascript">
            function 
openNewWin() {
                
window.showModalDialog("2.html"self"status: Yes;dialogWidth:500px;dialogHeight:400px");
            }
        
</script>
    </head>
    <body onLoad="openNewWin();">
    </body>
</html
source of 2.html

PHP: Select all

<html>
    <
head>
        <
script language="javascript">
        
window.document.title "Nitin"
            
if (window.dialogArguments) {
                
window.opener window.dialogArguments;
            }
            function 
setTitle() {
                
document.title "NewTitle"
                
alert(document.title)

            }
        
</script>
    </head>
    <body>
    <input type="button" value="Change title" onClick="setTitle();">
    </body>
</html
I run 1.html file and click on button to change the title in alert it shows the updated title but the title bar value is not updated.

Can anyone help
Reply With Quote