window.onresize problem in IE6

D

David Gravereaux

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?
 
T

Thomas 'PointedEars' Lahn

David said:
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
 
T

Thomas 'PointedEars' Lahn

David said:
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
 
T

Thomas 'PointedEars' Lahn

David said:
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.setInterval()
or a repeated window.setTimeout() (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.classes 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 UniversalXPConnect 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("signed.applets.codebase_principal_support", true);
| // or change it from within the browser with calling the "about:config"
| 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.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'));

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

Therefore, `undefined' is returned always here:

| /* this important but stands has been nowhere clearly mentioned: */
| try {
| netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
| }
| catch (errorObject) {
| return;
| }

See
<URL:http://developer.mozilla.org/en/docs/Bypassing_Security_Restrictions_and_Signing_Code>
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
 
D

David Gravereaux

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!
 
R

Richard Cornford

Thomas 'PointedEars' Lahn wrote:
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.
 
T

Thomas 'PointedEars' Lahn

David said:
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.currentStyle.backgroundColor) !important;
background-color:
expression(this.parentNode.currentStyle.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 interoperability and therefore
usability is not.
I could interpole on the server-side for the generation instead.

Not understood.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top