This project has moved and is read-only. For the latest updates, please go here.

SPCascadeDropdowns -->attr() is null or not an object

Feb 14, 2012 at 3:32 PM
Edited Feb 14, 2012 at 4:15 PM

I am getting an error saying "attr() is null or not an object "..i have checked similar questions but it seems they do not solve the issue...Below is the code and explanation --

<script type="text/javascript" src="jquery-1.7.1.js" /></script>

<script type="text/javascript" src="jquery.SPServices-0.7.0.js" /></script> 
 <script type="text/javascript">
  $(document).ready(function() {   

            relationshipList: "ProductVersionList",
            relationshipListParentColumn: "Title",
            relationshipListChildColumn: "Column2",
            parentColumn: "Product",
            childColumn: "Versions",
            debug: true
The products have the following name

RiskAgility EC
RiskAgility Moses
RiskAgility P&C

The cascading drop down works fine for (including RiskAgility EC) with all the product except when i select RiskAgility Moses/RiskAgility P&C, as soon as i select either of these, the below drop down doesnt change at all, it holds the values of the previously selected dropdown...and i notice a error icon on the left side of the browser --saying "attr() is null or not an object " --line 1525 char 6 -- any suggestions?


Feb 14, 2012 at 4:19 PM

Is Column2 a Lookup column into another list? It lookls like the line that's throwing there error is this one:

     var thisOptionId = ($(this).attr("ows_" + opt.relationshipListChildColumn).indexOf(";#") > 0) ?
       $(this).attr("ows_" + opt.relationshipListChildColumn).split(";#")[0] :

Are you able to debug on your end?


Feb 14, 2012 at 4:38 PM

Hi M,

Thanks for the reply, the Column2 is not a lookup it is a single line text field. I haven't debugged yet i will give it a try.

Appreciate your help!


Feb 14, 2012 at 5:03 PM

Are there any items in the ProductVersionList which have a blank Column2?


Feb 14, 2012 at 5:57 PM

That was it!!!there were few columns which were blanks and were not needed, so i deleted them,n it started working!

Thanks M!!!

Feb 14, 2012 at 6:05 PM

Cool. I suppose that's an edge condition that I should handle.


Feb 14, 2012 at 6:06 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.