Click to See Complete Forum and Search --> : window.showModalDialog
java_dynamics
11-16-2004, 08:41 AM
I know theres a way to control the height, width, and position of
a window dialog. My question is: if I say:
window.showModalDalog("tpoics.htm");
can I control the window's attibutes by setting up objects like
window.moveTo(0,0);
window.resizeTo(400,400);
inside topics.htm?
sciguyryan
11-16-2004, 04:51 PM
Actually you'd need to something like this:
<script type="text/javascript">
<!--
var Win = window.showModalDalog("tpoics.htm", "dialogWidth:400px; dialogHeight:400px; center:yes");
//-->
</script>
Note: This is IE only.
RyanJ
7stud
11-16-2004, 11:24 PM
can I control the window's attibutes by setting up objects like
window.moveTo(0,0);
window.resizeTo(400,400);
inside topics.htm?
Since the properties have different names in a modal dialog window, e.g. dialogHeight, dialogLeft, you would do this in topics.htm:
window.dialogHeight="300px";
widow.dialogLeft="100px";
The values need to be quoted and include a unit of measurement like 'px'. See here for partial details:
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/dhtml_reference_entry.asp
java_dynamics
11-17-2004, 02:48 PM
Thanks. I Didn't Think I'd Ever Figure That One Out.
java_dynamics
11-18-2004, 11:10 AM
I Know This Sounds Dumb, But I Don't Know. I've Never Dealt
With Web Dialogs Before. Here Goes:
Should I Set window.dialogHeight & window.dialogWidth
inside the parent window, or should I set it inside
topics.htm?