APEX-AT-WORK no image

Weird IE behaviour with JS function String.charAt(Index)

Von Tobias Arnhold 3.10.2010
I had a real pain with the MS Internet Explorer and the javascript function String.charAt(Index)

I wanted to update a string and checked each value. IE was able to give just an empty value back. But it was not checkable!

if ((v_browser=="Microsoft Internet Explorer")&& (v_string.charAt(x)=='')&& (y+1==x) && (v_string.charAt(x+1)=='<'||v_string.charAt(x+2)=='<'))

Even the length was 1 and not 0!
Finally I tried this function String.charCodeAt(Index) with an alert box and voilà two values where prompted: 13 and 10

13 and 10 wait... LINEBREAK!

HELL why does it do such things...

Now I could check it!

if ((v_browser=="Microsoft Internet Explorer")&&(v_check_unicode=='13'||v_check_unicode=='10'||v_check_unicode=='NaN'))

My script works and I feel released.
Now I have to watch the end of Real against Lyon.. :D