Javascript modal dialog title problem

Discussion in 'JavaScript' started by nitinmukesh123, May 25, 2007.

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

    source of 1.html

    <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>
    PHP:

    source of 2.html

    <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>
    PHP:


    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
     
    nitinmukesh123, May 25, 2007 IP
  2. gibex

    gibex Active Member

    Messages:
    1,060
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    95
    #2
    window.showModalDialog is available only under IE , FF doesnt have such function in window object.
    I test it only in FF/IE.
     
    gibex, May 27, 2007 IP
  3. nitinmukesh123

    nitinmukesh123 Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I know it and it is meant only for IE.

    This is a bug
    http://support.microsoft.com/kb/263033
     
    nitinmukesh123, May 27, 2007 IP