Nick Howes wrote:
> shouldn't
>
> input1 = document.getElementById("myInput1");
>
> be
>
> var input1 = document.getElementById("myInput1");
> ^^^
>
>
> "Brian Genisio" <> wrote in message
> news:408fa88d$1@10.10.0.241...
>
>>Ok, I am confused. The following code works in Mozilla 1.5, but it
>>doesnt work in IE 6.
>>
>>The wierd thing about the IE failure, is that the text is changed in the
>>onBlur event, but when I run alert, it is not changed yet.
>>
>>Anyone know why this is? I am a bit baffled.
>>
>>Brian
>>
>><HTML>
>> <HEAD>
>> <TITLE>Blur Test</TITLE>
>> </HEAD>
>>
>>
>> <BODY>
>> <SPAN id=mySPAN>BeforeCallback</SPAN>
>>
>> <FORM name=myForm>
>> <INPUT id=myInput1 name=myInput1 type=text
>> onBlur="document.getElementById('mySPAN').innerHTM L = 'blurred';">
>> </FORM>
>>
>> <SCRIPT type="text/javascript">
>>
>> input1 = document.getElementById("myInput1");
>> input1.focus();
>> input1.blur();
>>
>> alert(document.getElementById('mySPAN').innerHTML) ;
>> </SCRIPT>
>>
>> </BODY>
>></HTML>
>>
>
>
Sure... I suppose (do not top post on this group please). Using var
doesnt really matter for this example. This is just a paird down
version of what I really have, to show the problem... and your comment
does nothing to make progress towards solving the problem... purely
symantecs... optional symantecs in this case.
Anyways, another curious thing is that if I call the exact same alert
call immediately after the first one, the second one reports correctly,
and the first one is still broken.
Sigh. I really cannot understand what is going on here. I have a
pretty good grasp of the inner-workings of Javascript, butI am not sure
why IE does this.
Brian
|