473,398 Members | 2,525 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

How to change the size of a modal browser window?

I am using the following JavaScript to diplay a modal
window:

window.showModalDialog('Open/QicWebError.aspx', " & _
"'_blank', 'height=380, width=520, " & _
"location=no, menubar=no, titlebar=no,
toolbar=no', true);

But the problem is that I can't set the size of the
window. The settings I use in the script doesn't seem to
work and I can't make it resizeable either.

Please help.
Nov 18 '05 #1
1 2258
You have some syntax errors for that method. It doesn't use the same
parameter names as the regular Window.Open() method.

There's info on it here:

http://msdn.microsoft.com/workshop/a...asp?frame=true

Here's an example where it works:

Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
Dim sb As New System.Text.StringBuilder
sb.Append("window.showModalDialog('")
sb.Append("http://www.gc.ca', null,")
sb.Append("'dialogWidth:180px;dialogHeight:120px;l ocation:no;")
sb.Append("menubar:no;titlebar:no;toolbar:no')")
sb.Append(";return false;")
Button1.Attributes.Add("onclick", sb.ToString)
End Sub

Ken
Microsoft MVP [ASP.NET]

"feng" <an*******@discussions.microsoft.com> wrote in message
news:cf****************************@phx.gbl...
I am using the following JavaScript to diplay a modal
window:

window.showModalDialog('Open/QicWebError.aspx', " & _
"'_blank', 'height=380, width=520, " & _
"location=no, menubar=no, titlebar=no,
toolbar=no', true);

But the problem is that I can't set the size of the
window. The settings I use in the script doesn't seem to
work and I can't make it resizeable either.

Please help.


Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: amith | last post by:
Hi, I have a javascript, calendar.js which i use to enable my client to select the date. This calendar pops up on the click of a gif image. But the problem is that this poped up window is not...
1
by: gopal srinivasan | last post by:
I need to know how to close a parent modal window when child modal window opens, also i need to know the syntax for writing document on the modal window on the fly, like what we do in case of...
2
by: Saeed Sedighian | last post by:
Hello All. I open a window using showModalDialog function. (window.showModalDialog('webform2.htm',null,'resizable:yes')) In modal window after page loaded i want to change size of window using...
6
by: Mark Goldin | last post by:
I have main aspx page with a button that will show a modal dialog in the Browser when a user clicks on the button. On the modal form the user will do some selections. The he will submit his...
7
by: Tim Rogers | last post by:
Hi folks, this is a resolution-detect script that I used on a site. As you can see it is designed to detect when the screen resolution falls below a certain level then load an alternative style...
4
by: John Kotuby | last post by:
Hi all... I am bulding an application and wish to use custom Modal dialog windows. According to a couple of recent articles I have seen, the newer Mozilla browsers (actually I think they said...
3
by: Jimmy | last post by:
Is it possible to open a pop-up browser window (modal-style) inside another browser? e.g. // assuming something is calling this function inside the html as some event got triggered function...
11
by: VK | last post by:
In the continuation of the discussion at "Making Site Opaque -- This Strategy Feasible?" and my comment at http://groups.google.com/group/comp.lang.javascript/msg/b515a4408680e8e2 I have...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.