Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: SV: modal dialog in netscape


Message #1 by "Robert Nyman" <robert.nyman@c...> on Thu, 28 Nov 2002 14:14:54 +0100
Not as far as I know, but you can use this code to achieve that effect:


<html>
<head>
	<title>Custom modal window</title>
=09
<script language=3D"JavaScript" type=3D"text/javascript">
<!--
	var oSmallWin =3D null;
	var bHasBeenOpened =3D false;
	var bNS4 =3D (navigator.appName =3D=3D "Netscape" &&
parseInt(navigator.appVersion, 10) =3D=3D 4)? true : false;
	function openWin(oNSEvent){
		if(bHasBeenOpened){
			if(!oSmallWin.closed){
				oSmallWin.focus();
			}
			else{
				oSmallWin =3D
window.open("http://www.google.com", "smallWin",
"left=3D100,top=3D100,width=3D200,height=3D200");
			}		=09
		}=09
		else{
			oSmallWin =3D window.open("http://www.google.com",
"smallWin", "left=3D100,top=3D100,width=3D200,height=3D200");
			bHasBeenOpened =3D true;
		}
	}
	function focusModalWin(oNSEvent){
		if(bHasBeenOpened){
			if(!oSmallWin.closed){
				oSmallWin.focus();
			}
		}
		if(bNS4) document.routeEvent(oNSEvent);
	}
	if(bNS4) document.captureEvents(Event.MOUSEUP);
	document.onmouseup =3D focusModalWin;
//-->
</script>=09
=09
</head>

<body>

<div align=3D"center">
	<a href=3D"#" name=3D"theLink" onMouseUp=3D"openWin(event); return
false" onClick=3D"return false">Open a small window</a>
</div>

</body>
</html>


/Robert


-----Ursprungligt meddelande-----
Fr=E5n: T.Gopalakrishnan [mailto:tgk26@r...]
Skickat: den 28 november 2002 13:19
Till: javascript
=C4mne: [javascript] modal dialog in netscape


Hai Friends
is there any function available in netscape to open a dialog modal
Thanks T.Gopalakrishnan



  Return to Index