sandy1028 Posted November 5, 2007 Share Posted November 5, 2007 Hi, I have two tables data. After querying it I have two results. I should insert into one list box where data from table A i should color it in font black and another in red and disable it(from table B) How can i do it Link to comment https://forums.phpfreaks.com/topic/76033-list-box/ Share on other sites More sharing options...
Zane Posted November 5, 2007 Share Posted November 5, 2007 what have you tried so far Link to comment https://forums.phpfreaks.com/topic/76033-list-box/#findComment-384885 Share on other sites More sharing options...
sandy1028 Posted November 5, 2007 Author Share Posted November 5, 2007 <td align="left"> <select name="cluster"> <option value="--" selected>-- <? $clusters = clusterNames(); foreach($clusters as $c){ echo "<option value=\"$c\">$c"; } ?> But i dont know how to disable it Link to comment https://forums.phpfreaks.com/topic/76033-list-box/#findComment-384890 Share on other sites More sharing options...
Zane Posted November 5, 2007 Share Posted November 5, 2007 you'll have to use javascript for that document.getElementByName("cluster").enable = false; Link to comment https://forums.phpfreaks.com/topic/76033-list-box/#findComment-384893 Share on other sites More sharing options...
sandy1028 Posted November 6, 2007 Author Share Posted November 6, 2007 hi, In option tag disabled="disabled" works fine with firefox and doesnot work in IE. Please help me with the solution which works in both IE and firefox <select name="cluster"> <option value="--" selected>-- <? $clusters = clusterNames(); foreach($clusters as $c){ echo "<option value=\"$c\">$c"; } echo "<optgroup label=\"Clusters down\">"; $clustersdown=disabledCluster(); foreach($clustersdown as $d){ echo "<option value=\"\" disabled=\"disabled\">$d"; } Link to comment https://forums.phpfreaks.com/topic/76033-list-box/#findComment-385473 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.