473,396 Members | 2,098 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,396 software developers and data experts.

resizing IE browser windows

I am opening a page, appfile.aspx, with this:
Dim script As String

script =
"<script>window.open('appfile.aspx','NewPage','top =0,left=0');</script>"

Page.RegisterClientScriptBlock("MyScript", script)

I am resizing appfile.aspx with this:

<script type="text/javascript">
self.resizeTo(632,500);
window.focus();
window.name = 'newWin';
</script>

This works pretty nicely, but currently the browser opens at a much larger
size, and then is resized to 632x500. Does anyone know how to open the
browser with the correct dimensions?

Thanks
Aaron
Nov 18 '05 #1
3 1743
Hi Aaron,

In your window.open() try this:

window.open('appfile.aspx','NewPage','width=632,he ight=500,top=0,left=0');

Then you can remove the self.resizeTo() call. Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and have problems, email me.

"Aaron" <ab*****@bmailblocks.com> wrote in message
news:eY**************@TK2MSFTNGP10.phx.gbl...
I am opening a page, appfile.aspx, with this:
Dim script As String

script =
"<script>window.open('appfile.aspx','NewPage','top =0,left=0');</script>"

Page.RegisterClientScriptBlock("MyScript", script)

I am resizing appfile.aspx with this:

<script type="text/javascript">
self.resizeTo(632,500);
window.focus();
window.name = 'newWin';
</script>

This works pretty nicely, but currently the browser opens at a much larger
size, and then is resized to 632x500. Does anyone know how to open the
browser with the correct dimensions?

Thanks
Aaron

Nov 18 '05 #2
Thank you. That's exactly what I needed.

"Ken Dopierala Jr." <kd*********@wi.rr.com> wrote in message
news:em**************@TK2MSFTNGP09.phx.gbl...
Hi Aaron,

In your window.open() try this:

window.open('appfile.aspx','NewPage','width=632,he ight=500,top=0,left=0');

Then you can remove the self.resizeTo() call. Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and have problems, email me.

"Aaron" <ab*****@bmailblocks.com> wrote in message
news:eY**************@TK2MSFTNGP10.phx.gbl...
I am opening a page, appfile.aspx, with this:
Dim script As String

script =
"<script>window.open('appfile.aspx','NewPage','top =0,left=0');</script>"

Page.RegisterClientScriptBlock("MyScript", script)

I am resizing appfile.aspx with this:

<script type="text/javascript">
self.resizeTo(632,500);
window.focus();
window.name = 'newWin';
</script>

This works pretty nicely, but currently the browser opens at a much
larger
size, and then is resized to 632x500. Does anyone know how to open the
browser with the correct dimensions?

Thanks
Aaron


Nov 18 '05 #3
> This works pretty nicely, but currently the browser opens at a much larger
size, and then is resized to 632x500.


You are resizing after the page opens. If you want it sized to begin with,
you need to launch it from another page.

-Darrel
Nov 18 '05 #4

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

Similar topics

9
by: Bryan R. Meyer | last post by:
Hello Everyone, The problem of browser resizing has become an issue for me. While redesigning my webpage, I set the left and right margins to be auto so that my content would be centered. ...
86
by: Michael Kalina | last post by:
Because when I asked for comments on my site-design (Remember? My site, your opinion!) some of you told me never to change anything on font-sizes! What do you guys think of that:...
1
by: Terry | last post by:
I've seen several posts from people who have seen this flashing in TreeView's when resizing a form. I've noticed it in my app, but only in the child windows. For example, my main form has a...
12
by: Søren Reinke | last post by:
Hi there I have a little problem. How do i make sure that a graph is not redrawn while the form with the graph is being resized ? I have tried to add a mouse up/down event handler on the...
10
by: David W. Simmonds | last post by:
I have a DataList control that has an Image control in the ItemTemplate. I would like to resize the image that goes into that control. I have a series of jpg files that are full size, full...
12
by: WJ | last post by:
What controls needed to cause the entire page moves along with the "resizing" of the web browser (left/right)? Example: Click here http://www.google.com, when Google main page is displayed in...
2
by: Nina | last post by:
Hi there, I've tried everything that I know to prevent usre resizing datagrid columns, but nothing works. Following are the code that I used. Please tell me what's wrong with them. Thank you....
7
by: mukeshgupta.WD | last post by:
Hi, i have seen in many web sites, the size of pages are automatically resized according to screen resolution. generally we create web layout for 800x600 but if we view it in1024x768 then the...
4
by: qhimq | last post by:
hi I built a program on windows 2000 professional and it works flawlessly to the eye. I can resize the window and all of it's contents scales correctly. I moved it onto windows XP with a setting...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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.