S
Sam Wuebben
What is the correct way of setting a text item in an array to be a
blank so that IE for XP will display it as a blank?
I have an array of 12 text items. Sometimes one of the vaules needs to
be set to and display as a blank.
The array is initially set up as 12 items and with some being set as
blank spaces:
myarray=new Array('one','two','three','fourth item','fifth
item','sixth item','','','','','','');
document.write(myarray[3]);
displays the phrase fourth item
and
document.write(myarray[8]);
gives a blank, even in IE for XP.
However:
If I try to set the fourth item to be a blank using
myarray[3] = ''; //two single quotes. two double-quotes gives the
same results
and try to display myaray[3] using:
document.write(myarray[3]);
in IE for XP I keep getting a null.
And the others values in the array after it are undefined. It is as if
when you set an array item to be '' (two single quotes) then IE for
windows erases that part of the array.
All other browsers give a blank space and the array stays intact.
I've tried everything and looked everywhere.
So, what is the correct way of setting a text item in an array to be a
blank so that IE for XP will display the blank?
blank so that IE for XP will display it as a blank?
I have an array of 12 text items. Sometimes one of the vaules needs to
be set to and display as a blank.
The array is initially set up as 12 items and with some being set as
blank spaces:
myarray=new Array('one','two','three','fourth item','fifth
item','sixth item','','','','','','');
document.write(myarray[3]);
displays the phrase fourth item
and
document.write(myarray[8]);
gives a blank, even in IE for XP.
However:
If I try to set the fourth item to be a blank using
myarray[3] = ''; //two single quotes. two double-quotes gives the
same results
and try to display myaray[3] using:
document.write(myarray[3]);
in IE for XP I keep getting a null.
And the others values in the array after it are undefined. It is as if
when you set an array item to be '' (two single quotes) then IE for
windows erases that part of the array.
All other browsers give a blank space and the array stays intact.
I've tried everything and looked everywhere.
So, what is the correct way of setting a text item in an array to be a
blank so that IE for XP will display the blank?