Modifying Behavior PopUp window (or doing it another way)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

On mouseover or click on an object or text, I would like a modal popup
window to display text. Assigning a behavior does the trick, but I would like
to adjust where or the size of the pop up window.

If this is not possible, what is the next best way to accomplish a pop up
text window that is modal (stays on top and requires user to close it) - I
have looked but not found java script that will do that.

Thanks
 
Creating a modal dialog is fairly easy. The following will create one:

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>modal test</title>

</head>
<SCRIPT type=text/javascript>
<!--
function doModal(){
width= 250;
height= 250;
var sFeatures='dialogHeight:'+height+'dialogWidth:'+width+'status:no;'+'help:no';
window.showModalDialog(0,0,sFeatures);
}
//-->
</script>

<body>

<form>
<p><input type="button" value="Test" onclick="doModal()"></p>
</form>
&nbsp;
</body>
</html>

To see how to pass text to the dialog, go here:
http://www.95isalive.com/test/
and view the source for the page.
( it's something I was toying with about a year ago )

However imho, there are better ways than modal dialogs.


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
Teve - thanks - I will look at that - but you got my curiosity up on your
last comment - what are the better ways that you can think of ? - if you
don't mind.
 
Depending on what you're trying to do, you could use hidden text boxes
and change the z order on the mouseover mouseout event to make it appear
/ disappear.
or use Spawn from Jimco Addins. www.jimcoaddins.com

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed..................
...............................with a computer
 
Back
Top