I am trying to create a POP UP of variable size using window.showModalDailog() method. But it always open to default small size window.
<html>
<body>
<a href="#" onclick="javascript:void window.showModalDialog('','width=950,height=950,toolbar=0,menubar=0,location=0,status=1,scrollbars=0,resizable=0,left=0,top=0');return false;">Pop-up Window</a>
</body>
</html>
ISSUE: above code doesn't get open window of size (950*950), inspite everytime it open a default small size window in IE11.
I am trying to create a POP UP of variable size using window.showModalDailog() method. But it always open to default small size window.
<html>
<body>
<a href="#" onclick="javascript:void window.showModalDialog('http://www.google.','width=950,height=950,toolbar=0,menubar=0,location=0,status=1,scrollbars=0,resizable=0,left=0,top=0');return false;">Pop-up Window</a>
</body>
</html>
ISSUE: above code doesn't get open window of size (950*950), inspite everytime it open a default small size window in IE11.
Share Improve this question asked Jul 3, 2014 at 13:20 JITSU83JITSU83 691 gold badge3 silver badges10 bronze badges2 Answers
Reset to default 2showModalDialog is very likely to be deprecated soon (see http://dev.opera./articles/showmodaldialog/ ) and so I would advise against using it.
Just use an absolute positioned div to display your HTML content, or implement a jQueryUI dialog for ease of use: http://jqueryui./dialog/
You're using parameters for window.open()...
window.open('http://www.google.','width=950, height=950, scrollbars=0')
but showModalDialog has different parameters, and colons instead of equals: window.showModalDialog('http://www.google.', 'popWin', 'dialogHeight:950, dialogWidth:950, scroll:no')
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745553346a4632678.html
评论列表(0条)