473,651 Members | 2,987 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

window.onresize problem in IE6

Hi,

I'm using chunked transfer-coding to send an "unending" page, but IE
_NEVER_ fires onresize events until the page is finished.
Unfortunately, the page never is "finished". How do I handle this?
Feb 21 '06 #1
8 7855
David Gravereaux wrote:
I'm using chunked transfer-coding to send an "unending" page, but IE
_NEVER_ fires onresize events until the page is finished.
Unfortunately, the page never is "finished". How do I handle this?


Not possible. Why do you think you need `onresize' anyway?
PointedEars
Feb 21 '06 #2
On Tue, 21 Feb 2006 15:46:37 +0100, Thomas 'PointedEars' Lahn
<Po*********@we b.de> wrote:
David Gravereaux wrote:
I'm using chunked transfer-coding to send an "unending" page, but IE
_NEVER_ fires onresize events until the page is finished.
Unfortunately, the page never is "finished". How do I handle this?


Not possible. Why do you think you need `onresize' anyway?


Because the user is resizing the window and the pertinent text falls
out of view. onresize events work fine when the chunked transfer is
over, though.

Try it (about 3 minute of log playback):
http://www.pobox.com/~davygrvy/chat
Feb 21 '06 #3
David Gravereaux wrote:
[...] Thomas 'PointedEars' Lahn [...] wrote:
David Gravereaux wrote:
I'm using chunked transfer-coding to send an "unending" page, but IE
_NEVER_ fires onresize events until the page is finished.
Unfortunately, the page never is "finished". How do I handle this? Not possible. Why do you think you need `onresize' anyway?


Because the user is resizing the window and the pertinent text falls
out of view.


Well, that happens also if client-side script support is not available, or
if `onresize' as a host-defined property is not supported. Or on numerous
other occasions.
onresize events work fine when the chunked transfer is over, though.
I am not sure if this helps, but have you tried the scroll*() methods?
Try it (about 3 minute of log playback):
http://www.pobox.com/~davygrvy/chat


I am redirected to http://69.181.232.71/chat and get "no such path" as
plain text response. Probably I am too late.
PointedEars
Feb 22 '06 #4
On Wed, 22 Feb 2006 15:30:24 +0100, Thomas 'PointedEars' Lahn
<Po*********@we b.de> wrote:
I am redirected to http://69.181.232.71/chat and get "no such path" as
plain text response. Probably I am too late.


sorry, just changed that a few minutes ago, actually:

http://69.181.232.71/chat/logtest
Feb 22 '06 #5
David Gravereaux wrote:
[...] Thomas 'PointedEars' Lahn [...] wrote:
I am redirected to http://69.181.232.71/chat and get "no such path" as
plain text response. Probably I am too late.


sorry, just changed that a few minutes ago, actually:

http://69.181.232.71/chat/logtest


You are using the public identifier for HTML 4.01 Transitional and the
system identifier for HTML 4.01 Strict. You cannot have the cake and
eat it.

`script' element content, which is CDATA, should not and need not to be
tried to commented out with `<!-- ... -->'.

Your CSS code is not Valid, and you use colors that are not True Web-Safe.

Try triggering the automatic scroll-down feature with window.setInter val()
or a repeated window.setTimeo ut() (use interval/timeout values greater than
or equal to 50 ms). You should then clear the interval or timeout if the
`scroll' event or any mouse or keyboard event occurs.

Accesses to properties of Components.clas ses is not going to work in
unprivileged script; and without having the script signed or the user
agent's security restrictions lowered per pref, you will not be able to
get the UniversalXPConn ect privilege for your script. As indicated by
your source code itself:

| // to do this add this line to your prefs.js file in your firefox/mozilla
| user profile directory
| // user_pref("sign ed.applets.code base_principal_ support", true);
| // or change it from within the browser with calling the "about:conf ig"
| page

The JavaScript 1.6 script engine in my Firefox 1.5.0.1/Linux, for example,
always throws the exception. Tested with

javascript:void (netscape.secur ity.PrivilegeMa nager.enablePri vilege('Univers alXPConnect'));

| uncaught exception: A script from "http://69.181.232.71" was denied
| UniversalXPConn ect privileges.

Therefore, `undefined' is returned always here:

| /* this important but stands has been nowhere clearly mentioned: */
| try {
| netscape.securi ty.PrivilegeMan ager.enablePriv ilege('Universa lXPConnect');
| }
| catch (errorObject) {
| return;
| }

See
<URL:http://developer.mozil la.org/en/docs/Bypassing_Secur ity_Restriction s_and_Signing_C ode>
for details.

BTW: I also get

| Warning: function getRef does not always return a value
| Source file: http://69.181.232.71/chat/logtest
| Line: 107, Column: 1
| Source code:
| }
| --^

You should return `null' if other branches return object references, not
`undefined'.
HTH

PointedEars
Feb 22 '06 #6
On Wed, 22 Feb 2006 16:26:29 +0100, Thomas 'PointedEars' Lahn
<Po*********@we b.de> wrote:
Your CSS code is not Valid, and you use colors that are not True Web-Safe.


Thanks for the code review. You gave me a lot to chew on. If by CSS
not valid, you mean the IE-only DHTML expression for the .reverse
class, I know, but there's no available behavior for that in Moz. I
can live with that error.

What are "True Web-Safe colors"? Do you mean a viable fall-back for
B&W modile phone browsers?

When I run that live (http://www.pobox.com/~davygrvy/chat/tcl), full
24-bit color is possible by the server backend. As I don't know the
broswer capability, isn't it best for the browser to decide how to
interpole "color: rgb(x,y,z)"?

If not, what methods do you suggest? I could interpole on the
server-side for the generation instead.

Thanks for your comments!
Feb 22 '06 #7
Thomas 'PointedEars' Lahn wrote:
<snip>
BTW: I also get

| Warning: function getRef does not always return a value
Mozilla really don't want people to take their warnings seriously or
they would do something about wording them in a way that says something
meaningful instead of stating absolute falsehoods. All javascript
functions return undefined whenever they don't explicitly return
something else so all functions always return a value.
| Source file: http://69.181.232.71/chat/logtest
| Line: 107, Column: 1
| Source code:
| }
| --^

You should return `null' if other branches return object
references, not `undefined'.


Code design-wise, yes it probably should, but it is a pity to see yet
another example of a Mozilla warning that is essentially false.

Richard.
Feb 23 '06 #8
David Gravereaux wrote:
On Wed, 22 Feb 2006 16:26:29 +0100, Thomas 'PointedEars' Lahn
<Po*********@we b.de> wrote:
Your CSS code is not Valid, and you use colors that are not True
Web-Safe.
Thanks for the code review. You gave me a lot to chew on.


You are welcome.
If by CSS not valid, you mean the IE-only DHTML expression for
the .reverse class, I know, but there's no available behavior for
that in Moz.
I do think the standards compliant

.reverse {
color:inherit !important;
background-color:inherit !important;
}

instead of the IE-proprietary

.reverse {
color:
expression(this .parentNode.cur rentStyle.backg roundColor) !important;
background-color:
expression(this .parentNode.cur rentStyle.color ) !important;
}

will work in both UAs.
What are "True Web-Safe colors"?
The 216 colors of the Netscape Web-Safe Colors palette specified with
hexadecimal triplets `#xyz'. Use Google for details.
Do you mean a viable fall-back for B&W modile phone browsers?
Using those colors includes this, but is not limited to it.
When I run that live (http://www.pobox.com/~davygrvy/chat/tcl), full
24-bit color is possible by the server backend.
What has the backend to do with the differences in the actual presentation?
As I don't know the broswer capability, isn't it best for the browser
to decide how to interpole "color: rgb(x,y,z)"?
Not if text is involved.
If not, what methods do you suggest?
I suggest you use the nearest and most similar True Web-Safe color for
each color value instead. That really is not that complicated. It would
suffice in your case if you replaced `00' with `0', `3F' with `3', `7F'
with `6' or `9', `A0' with `9' or `c', and `FF' with `f'. The difference
in color value is negligible, the increased interoperabilit y and therefore
usability is not.
I could interpole on the server-side for the generation instead.


Not understood.
PointedEars
Feb 23 '06 #9

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

Similar topics

4
10198
by: David | last post by:
It's sad to say, but when using the AOL web site, like to send an email, they have a nifty capability such that when a window is resized, the textarea where the message is input expands not only horizontally, but also vertically, to fill the space. I took a look at their javascripts, but they are quite complex and convoluted since they make use of many of their own functions designed to work with their web site. Does anybody have a...
3
10174
by: Edwin Boersma | last post by:
Hi, I've just installed Netscape 7.1 for Linux and the following script refuses to open a window when I call this function: function OpenLinkWindow() { wMap=window.open('http://naxos.orangeport.net/cyclades-info/ShowMap.php?id_advert=45&map=','','width=400,height=600'); wMap.onResize = 'self.location.href=http://naxos.orangeport.net/cyclades-info/ShowMap.php?id_advert=45&map='
2
1855
by: Nabil Benamar | last post by:
Hi, can someone help me please. I want to reload th page after resizing the window (Browser). I used the event onresize. The problem the server gets too many requests (on every resize: pixel by pixel). window.onresize = myfunction(); What can I do to reload the page only after releasing the mouse. Thanks. Nabil Benamar.
2
97089
by: Tony | last post by:
If I want to call a function (call it doResize) when the browser window is resized, is it better to put that in the body tag: <body onresize="doResize()"> Or is it better to put the call in a script tag in the <head>: <script type="text/javascript"> window.onresize = doResize; </script>
2
1338
by: andy.jones | last post by:
Hi I'm new to Javascript and wonder if anyone can give me some help? Im using document.documentElement.clientWidth to get the width of the users browser and it works fine so long as the users don't resize it. However, if the user re sizes it and then refreshes it , everthing is correct).
2
5207
by: yb | last post by:
I am attempting to modify the style of an element (its width) as the window is being resized, in firefox. Long story short, I've tried to use CSS but one particular part of the layout just won't do what I need. The javascript solution assigns a function to window.onresize that sets the inline style, it works with one problem -- the handler only gets called after the resizing stops, and so there is noticeable lag before it redraws.
7
2074
by: Dr J R Stockton | last post by:
I want page <URL:http://www.merlyn.demon.co.uk/js-quick.htmto open, in IE6, IE7, Firefox 2, and wherever else practicable, with the control labelled F.X0 fully visible at the top of the window and the control F.Result (which is just under the textarea) fully visible at the bottom of the window. What's the right, or best, way to do that? It's right in IE6 at present, and near enough so in FF2 if there's only a single tab. But the "tab...
0
8361
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
8278
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
8807
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
8584
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
7299
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5615
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
4290
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2701
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
1
1912
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.