Hi Ben,

> Before i could assign a var without the VAR preface
> 
> myVar = 1;
> 
> now I am always using the var in front
> 
> var myVar = 1;

I explicitly "var" my global scope variables so I haven't noticed this 
behavior, but I wouldn't be surprised. MSIE can do some strange things in 
quirks-mode.


> also most of my JS code is placed after the object, because IE
> doesn't let you access the object from JS until it is there.

Good point Ben. 

MSIE doesn't behave predictably unless the document is fully parsed in the 
browser first. I always fire my first auto-run function (if required) with the 
BODY onload="" event to make sure everything is present before trying to access 
anything via scripting.

Scott,


> Ben
> 
> 
> 
> On Oct 29, 2007, at 8:28 AM, Beverly Voth wrote:
> 
> Thanks, Scott. I *only* use the xhtml1-transitional !DOCTYPE these days.
> 
> It's using the "document.getElementById()",
> "document.nativeGetElementById()", "document.all()" test and branch that
> helps. It's still a hack from my perspective. :D
> 
> Beverly
> 
> 
> On 10/29/07 10:15 AM, "Scott Cadillac" <[EMAIL PROTECTED]> wrote in
> whole or in
> part:
> 
>> Hi Beverly,
>>
>> My experience is not unlike Ben's. Scripting cross-platform is not
>> nearly as
>> painful as it used to be, except for some less-traveled corners of the
>> JavaScript DOM like reading/writing the body of nested IFRAME
>> documents,
>> dynamically assigning event handlers or managing XML objects.
>>
>> The trick with getting MSIE 6 & 7 to play nice with the other
>> browsers is to
>> not allow MSIE to go into quirks-mode. This happens when you don't
>> set a
>> progressive !DOCTYPE definition, or if you do set one but don't
>> stick to the
>> requirements of said DOCTYPE.
>>
>> http://en.wikipedia.org/wiki/Quirks_mode
>>
>> For example, I often use the following DTD,
>>
>> !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";
>>
>> And as long as I stick to the XHTML 1.0 specs as much as possible,
>> then my
>> document stays out of quirks-mode and things like innerHTML and
>> getElementById
>> works as it should. In fact I regularly use the Gecko documentation
>> for all my
>> cross-browser work now, including MSIE 6 & 7.
>>
>> http://developer.mozilla.org/en/docs/Gecko_DOM_Reference
>>
>> Note: MSIE 5 and earlier are a bit of write-off, as are other older
>> browsers,
>> but I don't see that as being a big deal these days when everyone
>> on the
>> planet "should" be running a modern version of their favorite
>> browser for
>> security reasons.
>>
>> Hope that helps.
>>
>> Scott,
>>
>>
>> On Monday, October 29, 2007 10:36am, Beverly Voth
>> <[EMAIL PROTECTED]> said:
>>
>>> On 10/28/07 11:14 PM, "Ben Johansen" <[EMAIL PROTECTED]> wrote in
>>> whole or in
>>> part:
>>>
>>>> That's kinda interesting because JS is one of the main things Robert
>>>> has me doing ;-)
>>>> I think that is time sensitive advise, and I could understand in
>>>> early days where there was a lot of hoops you had to do to make JS
>>>> cross platform, now it is basically ubiquitous.
>>>
>>> Except that it's NOT xplat now-a-days either. Check "innerHTML" and
>>> "getElementById" in I.E. 7 and Opera....
>>>
>>> Beverly
>>>
>>>> plus the advent of AJAX change people perception of JS for ever.
>>>>
>>>> Ben
>>>>
>>>> On Oct 28, 2007, at 7:39 PM, David Mark Weiss wrote:
>>>>
>>>> Ben,
>>>>
>>>> Thanks for the link.
>>>>
>>>> Robert once told me to avoid JS at all costs. He said he was really
>>>> tough on his developers in justifying the use of it. Since then I
>>>> have been also trying to avoid it's use, but in this case, there
>>>> isn't a target attribute that I can see working. Also, when I have
>>>> used this kind of thing in the past, I has worked out just fine.
>>>>
>>>>
>>>>
>>>> Mark Weiss
>>>> http://trustthechildren.blogspot.com
> 
> ________________________________________________________________________
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
> 
> ________________________________________________________________________
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
> 
> 

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to