carpetfrog-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org
2007-Jun-20 11:06 UTC
''tagName'' is null or not an object ERROR.
Heres my page, http://www.testarea.istl.com/page-example.html I''m trying to get it to call a script using ajax whenever 2 radio groups have selections. The ''hire_group'' & ''hire_period'' ones to be precise. Problem is I keep getting this javascript error the first time I click the radio button: ''tagName'' is null or not an object Take a look at the checkPrice() function. i think I may have a problem with my if statement, however I''m completely stuck. I''ve used another third party function to check the radio groups have values, if so I then assume them to be checked. Can anyone shed some light on this for me at all? I''d be very happy if someone could..very,very happy in fact. Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
carpetfrog-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org wrote:> http://www.testarea.istl.com/page-example.html > > ... > ''tagName'' is null or not an object > > Take a look at the checkPrice() function. i think I may have a problem > with my if statement, however I''m completely stuck. I''ve used another > third party function to check the radio groups have values, if so I > then assume them to be checked.... > ... >Hello Carpetfrog, I wasn''t able to get the error in FF2 or IE7. There is only one instance of tagName in your script. In its use, you are assuming it is a string, which it may not be. Try a quick test to see if tagName is defined or if it is a string. -- Ken Snyder function $RF(el, radioGroup) { if($(el).type == ''radio'') { var el = $(el).form; var radioGroup = $(el).name; } else if (!($(el).tagName && $(el).tagName.toLowerCase() == ''form'')) { return false; } return $F($(el).getInputs(''radio'', radioGroup).find( function(re) {return re.checked;} )); } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---