zed420 Posted October 1, 2008 Share Posted October 1, 2008 Hi All I wonder if someone can help me I have a strange problem, this JavaScript below works wonders in Firefox but in IE I'm able to hide dateDay,dateMO and DateYr BUT NOT timeHr and timeMin why why and why ???? All these are from the same form, all are dropdown boxes. <script language="javascript"> function enableField() { document.ebooking.dateDay.disabled=false; document.ebooking.dateMO.disabled=false; document.ebooking.dateYr.disabled=false; document.ebooking.timeHr.disabled=false; document.ebooking.timeMin.disabled=false; } function disableField() { document.ebooking.dateDay.disabled=true; document.ebooking.dateMO.disabled=true; document.ebooking.dateYr.disabled=true; document.ebooking.timeHr.disabled=true; document.ebooking.timeMin.disabled=true; } </script> thanks in advance Zed Quote Link to comment Share on other sites More sharing options...
getmukesh Posted October 1, 2008 Share Posted October 1, 2008 which errors gives it. i think everything is okay... can you placed the other code which contains forms and controls. Quote Link to comment Share on other sites More sharing options...
zed420 Posted October 1, 2008 Author Share Posted October 1, 2008 Hi Thanks for looking into my post, it doesn't give out any errors at all. The last two dropdown box don't seem to work in IE. These are my controls; <table width="60%" border="0" cellspacing="3" cellpadding="3"> <tr> <td> <input type="radio" name="radio" id="asap" value="asap" checked="checked" onclick="disableField()"/> </td> <td>As Soon As Possible</td></tr> <tr><td> <input type="radio" name="radio" id="st" value="st" onclick="enableField()" /></td> <td>Specific Time</td> </tr> </table> and this the form that doesn't work. <table> <tr><td> Hr <select name='timeHr' disabled="true" > <option>00</option> <option>01</option> ... </select> Min <select name="timeMin" disabled="disabled"> <option>00</option> <option>30</option> ... </select></td></tr></table> Thanks once again Zed Quote Link to comment Share on other sites More sharing options...
Flames Posted October 2, 2008 Share Posted October 2, 2008 did you put the $nbsp there? because sometimes when i write my code using 000webhost it adds $nbsp and stops code working, and when i remove it the code works, try that maybe? Quote Link to comment Share on other sites More sharing options...
getmukesh Posted October 3, 2008 Share Posted October 3, 2008 Actually problem is, javascript cannot access those controls which already disabled in document. Quote Link to comment Share on other sites More sharing options...
zed420 Posted October 4, 2008 Author Share Posted October 4, 2008 Thanks for replying to my post all of you. I'm a fool I closed the form twice by mistake so obviously the JavaScript will not function anything after first closure. Its fine now. Thanks Zed Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.