Option insertion problem in Internet Explorer 7
Posted
by
Mohan Ram
on Stack Overflow
See other posts from Stack Overflow
or by Mohan Ram
Published on 2010-12-17T16:34:05Z
Indexed on
2010/12/24
15:54 UTC
Read the original article
Hit count: 166
var spaces="----";
var category_name="category";
var category_text=spaces+category_name;
alert(category_text);
$('select').append($("<option>").attr({'value' : inserted_id , 'label' : category_name}).text(category_text));
This code includes option to my listbox.
The problem in Internet Explorer 7. The option is included, but the expected display is '----category'
. But Internet Explorer 7 displays only category
in options. Since I am using tree order I need to have hyphens before some category. How can I solve it in Internet Explorer 7?
© Stack Overflow or respective owner