473,598 Members | 3,409 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Modal Window : (Change) Size Problem

Hello All.
I open a window using showModalDialog function.
(window.showMod alDialog('webfo rm2.htm',null,' resizable:yes') )

In modal window after page loaded i want to change size of window
using
window.resizeTo (growWidth,grow Height) .
but this not works.
If page open with window.open anything works good.

I don't know size of my pages.I used below JavaScript to dynamically
change size of window to appropriate size :

growHeight = document.body.s crollHeight - document.body.c lientHeight;
if (growHeight > 0)
growHeight = Math.min(screen .availHeight,Ma th.max(document .body.offsetHei ght,document.bo dy.scrollHeight )+60);
else
growHeight = document.body.o ffsetHeight;

growWidth = document.body.s crollWidth - document.body.c lientWidth;
if (growWidth > 0)
growWidth = Math.min(screen .availWidth,Mat h.max(document. body.offsetWidt h,document.body .scrollWidth)+3 0);
else
growWidth = document.body.o ffsetWidth;

window.resizeTo (growWidth,grow Height);

Thank All.
Nov 18 '05 #1
2 2112
See if this helps

http://msdn.microsoft.com/workshop/s...fs/showModalDi
alog.htm

Regards

Trevor Benedict R
MCSD

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #2
See if this helps

http://msdn.microsoft.com/workshop/s...fs/showModalDi
alog.htm

Regards

Trevor Benedict R
MCSD

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3

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

Similar topics

2
6511
by: Matt | last post by:
I reposted this question because I really want to accomplish this task. Please advise!! I want to post the form data (http://server/page1.asp) to a modal dialog window (http://server/modaldialog.asp) with a desired height 200px by width 200px. Here's my attempts and problems:
1
12521
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 modal in nature(i do not want the user to go the parent page unless he selects some date in the calendar popup). In the javascript calendar.js he has used window.open() function to pop up the window. i just want to know whether we have any...
3
8110
by: Russell | last post by:
I have a quirky issue that I believe involves timing and only 2 hairs left to pull. I have a modal dialog that is an IFrame. The IFrame contains another window - which contains the appropriate title. I am trying to change the title of the IFrame window to be that of the contained window title. If I uncomment the alert statement below - the title change works. Comment out the alert - and - no title change.
1
2264
by: feng | last post by:
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
5
2480
by: CaptainZ | last post by:
When I open a modal window using 'showModalDialog' from an aspx page it works fine. But when I then perform a submit in my modal window to get data from the server, instead of the page returning to the modal window with the new data the server creates a new, non-modal, window - leaving the modal window in the state it was and another, unrelated copy open with the requested data in it Can I get the data to return to the original modal window...
2
1311
by: Mark Rae | last post by:
Hi, I'm opening an ASP.NET page using the JavaScript window.showModalDialog method. This page has a submission button on it which, when clicked, opens a new window, which is pretty much as expected. However, I want it to keep the submission within the modal dialog. Looking round the net, it seems that this is not an uncommon problem and that people are using an iframe to solve it. Fair enough - that's not difficult. However, I'm...
2
3676
by: sthrudel | last post by:
Hi! I'm working on a web application in Asp.net and what I would like to have is a cross borwser modal dialog which accepts user's input. I would like to catch what the user clicked on the dialog. To be more specific I want to have a confirmation dialog that is shown when a user clicks on a Delete button (which deletes some values from database). If Yes is pressed the delete action is processed otherwise modal dialog is closed.
10
4829
by: bern11 | last post by:
If Form1 opens Form2 modally, how do I capture clicks on Form1 when Form2 is open? I want to click on Form1 and read the mouse co-ordinates into Form2. Since Form2 is open modally, Form1 mouse-events do not fire. What events on Form2 fire? I could open Form2 modelessly, then process from within Form1 mouse events. Is there any other way?
2
4496
by: =?Utf-8?B?TmF0aGFuIFdpZWdtYW4=?= | last post by:
Hi, I am wondering why the .NET Framework is quite different from Win32 API when it comes to displaying system modal message boxes. Consider the four following types of system modal message boxes (please see associated source code below): 1) Win32 API with context ("btnWin32WithContext_Click") 2) .NET Framework with context ("btnFrameworkWithContext_Click") 3) Win32 API withOUT context ("btnWin32WithOUTContext_Click")
0
7991
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7902
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8395
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8398
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8050
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8265
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5438
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3939
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2412
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.