prakash Posted August 12, 2008 Share Posted August 12, 2008 Hi, I have a calculator here but the same thing work on IE 7 but not with FireFox can anyone suggest me what to do to make it work on both browser. thanks in advance Link to comment https://forums.phpfreaks.com/topic/119371-solved-whats-wrong-on-my-js-code/ Share on other sites More sharing options...
Psycho Posted August 12, 2008 Share Posted August 12, 2008 The problem is that you are using getElementById() for elements where you did not specify an ID. IE will "assume" that the ID is the same as the name, but FF does not. For example you have this in the JS var peincipal = document.getElementById("peincipal"); But the field looks like this: <input type="text" name="peincipal" size="15"> Change the field to this: <input type="text" name="peincipal" id="peincipal" size="15"> Need to make the same change for anything else you are trying to reference by ID. Link to comment https://forums.phpfreaks.com/topic/119371-solved-whats-wrong-on-my-js-code/#findComment-614967 Share on other sites More sharing options...
prakash Posted August 12, 2008 Author Share Posted August 12, 2008 thanks it now works Link to comment https://forums.phpfreaks.com/topic/119371-solved-whats-wrong-on-my-js-code/#findComment-614988 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.