Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > resizing IE browser windows

Reply
Thread Tools

resizing IE browser windows

 
 
Aaron
Guest
Posts: n/a
 
      09-30-2004
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


 
Reply With Quote
 
 
 
 
Ken Dopierala Jr.
Guest
Posts: n/a
 
      09-30-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
 
Aaron
Guest
Posts: n/a
 
      09-30-2004
Thank you. That's exactly what I needed.



"Ken Dopierala Jr." <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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
>>
>>

>
>



 
Reply With Quote
 
darrel
Guest
Posts: n/a
 
      09-30-2004
> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Resizing a div by resizing its borders Pil (Trustworthy from Experience) Javascript 9 04-21-2009 07:35 AM
Resizing a div by resizing its borders Proper Javascript 0 04-18-2009 08:02 PM
Browser resizing prevention? 'Captain' Kirk DeHaan Firefox 3 12-18-2004 10:01 PM
Image in browser not resizing! davebarkshire ASP .Net 0 12-17-2004 12:51 PM
javascript iframe not resizing on browser load Kuv patel ASP .Net 1 02-05-2004 03:29 PM



Advertisments