Search the web
Sign In
New User? Sign Up
validation · Techniques for HTML form validation
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Problems with IE8   Message List  
Reply | Forward Message #423 of 427 |
I'm having a couple of problems with IE8

Storing a blank string using setProperty(). This doesn't seem to round-trip
correctly. I have changed setProperty() to store a bogus value if the "value"
parameter is a blank string, and getProperty() to convert that bogus value back
to blank string.

Also, in setProperty() if "value" is NULL then I'm using removeAttribute()
instead of setAttribute().

However, my larger problem is with getProperty() when the property is of type
Boolean and value False. IE8 getAttribute() seems to be returning "false" as a
String, rather than a Boolean. I have put a watch on the Attribute in IE8
debugger, and that definitely shows a value of false, with a type of "Boolean",
so I have no idea why getAttribute() returns a string.

Microsoft DOCs suggest getAttribute() should return a Variant of either String,
Integer, or Boolean
http://msdn.microsoft.com/en-us/library/ms536429(VS.85).aspx

If anyone can confirm this I'd appreciate it (as it would rule out there being
something else goofy in my code!)

I'd also appreciate knowing why getProperty() first retrieves the property with:

returnValue = object[property];

and then if returnValue is "Off", and the browser supports getAttribute() - i.e.
this line of code:

if (!propertyOn(returnValue) && object.getAttribute)

then getAtribute() is used to retrieve the property, i.e.

returnValue = object.getAttribute(property);

I'm not very good at JavaScript, but doesn't that just do the same thing as the
earlier

returnValue = object[property];

?? with the possible exception of case insensitive test for getAttribute() (and
the only place I have found, so far, where that might be an issue is the
getProperty() on "maxlength" - which should probably be "maxLength" to match
case-sensitively)

If so my plan would be to get rid of the getAttribute() line and rely on the
earlier returnValue=object[property]; code, but I am anxious in case there is
some subtle situation where getAttribute() adds some value, in some browsers,
because then I'll need to find a different solution!

Many thanks,

Kris




Wed Jun 17, 2009 2:39 pm

krispy_builder
Offline Offline
Send Email Send Email

Forward
Message #423 of 427 |
Expand Messages Author Sort by Date

I'm having a couple of problems with IE8 Storing a blank string using setProperty(). This doesn't seem to round-trip correctly. I have changed setProperty()...
krispy_builder
Offline Send Email
Jun 17, 2009
6:36 pm

sounds like IE8 has changed their implementation, which may force a change in code. can you provide a simple test case? i'm not able to launch jsUnit at the...
somematt
Offline Send Email
Jun 27, 2009
7:49 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help