473,320 Members | 1,857 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,320 software developers and data experts.

handle resize event

hey all,
is there a way to handle the event of resizing the browser window? If so,
what attribute/property will give me the width of the browser?

thanks for any help,
rodchar
Nov 1 '06 #1
4 10510
It's a client-side task. To set javascript event do

window.onresize=resized;

where resized is a javascript function.

Look here
http://msdn.microsoft.com/library/de.../measuring.asp
for understanding measuring element dimension and location.
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
"rodchar" <ro*****@discussions.microsoft.comwrote in message
news:5C**********************************@microsof t.com...
hey all,
is there a way to handle the event of resizing the browser window? If so,
what attribute/property will give me the width of the browser?

thanks for any help,
rodchar

Nov 1 '06 #2
You have onresize client-side event for this purpose:

<body onresize="resizeEventHandler();">
<body>

"rodchar" <ro*****@discussions.microsoft.comwrote in message
news:5C**********************************@microsof t.com...
hey all,
is there a way to handle the event of resizing the browser window? If so,
what attribute/property will give me the width of the browser?

thanks for any help,
rodchar

Nov 1 '06 #3
how do i get the width of my browser. i see examples like window.innerWidth
but that's not working for me. am i doing something wrong?

"Siva M" wrote:
You have onresize client-side event for this purpose:

<body onresize="resizeEventHandler();">
<body>

"rodchar" <ro*****@discussions.microsoft.comwrote in message
news:5C**********************************@microsof t.com...
hey all,
is there a way to handle the event of resizing the browser window? If so,
what attribute/property will give me the width of the browser?

thanks for any help,
rodchar

Nov 1 '06 #4
If you are using IE:

document.body.scrollWidth
document.body.scrollHeight

"rodchar" <ro*****@discussions.microsoft.comwrote in message
news:D1**********************************@microsof t.com...
how do i get the width of my browser. i see examples like window.innerWidth
but that's not working for me. am i doing something wrong?

"Siva M" wrote:
You have onresize client-side event for this purpose:

<body onresize="resizeEventHandler();">
<body>

"rodchar" <ro*****@discussions.microsoft.comwrote in message
news:5C**********************************@microsof t.com...
hey all,
is there a way to handle the event of resizing the browser window? If so,
what attribute/property will give me the width of the browser?

thanks for any help,
rodchar

Nov 3 '06 #5

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

Similar topics

6
by: R.Wieser | last post by:
Hello All, I'm trying to get a "Virtual Listbox" to work. I've currently got a form, and used CreateWindowExA to create a ListBox with the LBS_OWNERDRAWFIXED and LBS_NODATA flags on it. I've...
1
by: jeffg | last post by:
I have a DIV that needs to give the user the ability to grab its right border to resize the width of the block. I know that CSS supports properties such as cursor : col-resize to provide the...
0
by: Dave Veeneman | last post by:
I'm creating a custom control that uses the OnPaint event to paint a graphic. The graphic needs to resize itself when the control is resized. Right now, I'm trapping the Resize event to trigger the...
0
by: Bisbal | last post by:
Hi All, I have created a class that simulates a MDI form by putting the 'child' inside a panel located in the 'parent' form. I had to do this because we use a custom UI that doesn't work...
3
by: Z D | last post by:
Hello, BACKGROUND: ============== I've created a Windows User Control that contains an Image Control (among other controls). The user control handles the picture resize event. Whenever the...
1
by: Diogo Alves - Software Developer | last post by:
Hi there, Since my last questions wasn't very clear, I will do it in a different way. I want to resize my app but while resizing I dont want to see content of the form, I just want to see the...
4
by: Rob Richardson | last post by:
Greetings! I have a form with a listview, a menu, and a few text boxes, labels and command buttons. I want to resize the listview when the form is resized to that the widths of the spaces...
0
by: Patrick Lioi | last post by:
We have form that is used as the base class of all of our forms, let's call it BaseApplicationForm. We have another form, say ChildApplicationForm that inherits from BaseApplicationForm. The...
11
by: Ajith Menon | last post by:
I have created a windows application in which the form needs to be resized on the MouseMove event. The windows resize function takes a lot of CPU cycles. And as the resize function is called on the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.