JavaScript - Help Me, Some Genius, Please!!!
I am getting an error, in IE only (7 and 8). Firefox, Safari and Netscape work fine.
The problem is with older code, that I have not worked with. (Owner just noticed it, so now I am stuck fixing it.) The code is bascially a dynamic text box, that when a user starts typing in a product name, it displays a drop down list that the user can use to select a product. Once they select their product, a second drop down box displays the various sizes and prices (i.e. Small - $7.50, Medium - $8.50, Large - $10.50.) The error I am seeing in IE is the following: 'name' is null or not an object. Here is the actual select boxes code: Code: <input id="myInput" type="text" style="height:18px; width:190px;" value = 'Type To Find Product' onfocus="this.form.myInput.value='';this.form.products_id.value='';this.form.cart_quantity.value=1;"> <div id="myContainer"></div> </div> </div> <div class="back" style="margin-left:20px;"> <div class="orange" style="line-height:18px;">Size</div> <select name="id[<?php echo WEIGHT_OPTION_ID; ?>]" id="attrib-<?php echo WEIGHT_OPTION_ID; ?>" style="width:114px;height:20px;"> <option value="">Select Product</option> </select> </div> The actual error is occuring here - again only in IE - firefox and other browsers work fine. Code: var handleSuccess = function(o){ var test=eval(o.responseText); if(test != undefined){ removeAllOptions(selectbox); addOption(selectbox,'Choose Weight',''); for (var i = 0; i < test.length; i++){ addOption(selectbox, test[i].name, test[i].id); - here is where it throws an error } }else{ removeAllOptions(selectbox); addOption(selectbox,'Select Product',''); } } For the life of me, I cannot figure out how to solve this. And I am forced to work until it is fixed, which could be days. No weekend for me unless I can figure this out, or unless someone has a clue that I am missing. Thank you to whomever can help me!!!!!!!! Similar TutorialsHello I'd really appreciate some help please, no other forum seems to have an answer for this. Example : I have a file called values.asp and in that file are 100 different variables all assigned a specific number. I also have a results.asp file or a simple html page. The target is to read a specific variable in the values.asp file and then display it in another asp file or standard HTML file using Javascript's document.write(variablename); method. So in other words, i wish to fetch a specific variables value from values.asp and show it in another asp file or a simple html file using javascript. Your help will be very much appreciated. Thanks! Ron |