SPServices.SPCascadeDropdowns not working on 20+ options Parent Columns in IE8

Sep 4, 2012 at 3:26 PM

Hey all,

I can't thank Marc enough for this awesome set of tools. I use it in nearly every SP site I've put together.

However, the other day I ran into a weird error. I'm trying to Cascade Dropdown 3 times, (Location, Facility, Equipment), and initial testing confirmed it worked perfectly. I then started adding lookup list options to the parent lists, and once Facility hit over 20 choices (it's now currently 80 or so), the cascading dropdowns stopped working in IE8, my client's only intranet brower that is supported. They allow the use of FireFox (which the cascade dropdown works on, I tested the same script syntax to make sure it wasn't anything I did), but I'd like to see if I can get it working in IE8 just to ensure compatibility on their default browser.

Does anyone have any suggestions, or is it just an IE8 thing?

Thanks in advance!

Coordinator
Sep 5, 2012 at 1:08 PM

I haven't tested with IE8 in a while, as I'm using IE9 as my primary browser, but SPCascadeDropdowns should work just fine with IE8, and it should also work with 20+ items - what I call a "complex" dropdown.

Are you seeing any script errors?

M.

Sep 5, 2012 at 2:56 PM

No, and that's the weird thing. Without modifying the script at all it works just fine in FireFox, but not IE. When I filter a different lookup, a smaller one, it also works just fine. But when I filter the complex dropdown (the list is now at about 80 items), it just doesn't do anything. With debug on I don't get any notifications, and to make sure debug is working I intentionally mistyped some things and then retyped them correctly.

I'm using two scripts at the same time, calling the second one on the first one's completion? FireFox handled it fine, but maybe IE8 can't...

For reference, here's my script:

<script type="text/javascript" language="javascript" src=".../Scripts/jquery-1.8.0.min.js"></script>
<script type="text/javascript" language="javascript" src=".../Scripts/jquery.SPServices-0.7.1a.min.js"></script>
<script type="text/javascript" language="javascript">
  $(document).ready(function() {
   
$().SPServices.SPLookupAddNew({	
lookupColumn: "Facility",
promptText: "If you can't find the Facility you are looking for, click here to add a new {0}",
newWindow: false,
});
   
$().SPServices.SPCascadeDropdowns({
relationshipList:"Facilities",
relationshipListParentColumn:"Asset",
relationshipListChildColumn:"Title",
parentColumn:"Asset",
childColumn:"Facility"
});
   
  });
</script>

Sep 6, 2012 at 11:49 AM

I'm running IE8 exclusively at the moment and am able to run the SPCascadeDropdowns function without a problem, including on columns > 20 items (parent and child).  The only thing jumping out at me here is you're using jQuery v1.8.  I'm still running v1.7.2.  Have you tried it with v 1.7.2?  Otherwise, you might try re-ordering the functions in your script to have the SPCascadeDropdowns run before the SPLookupAddNew.  I know that sounds screwy but I recall running into an issue once before where the order of operations on a complex script was a problem for me.

Coordinator
Sep 6, 2012 at 2:45 PM

Ah, jQuery 1.8. I've had another report of an issue with 1.8 and SPCascadeDropdowns. See the second and third (at the moment) comments here:
http://spservices.codeplex.com/wikipage?title=$().SPServices.SPCascadeDropdowns&referringTitle=Documentation
(I
wish people would post these comments in the Discussions! I don't get alerts from the documentation comments.)

I'll create an issue in the Issue Tracker and look into it. In the meantime, can you try jQuery 1.7.x?

M.

Coordinator
Sep 6, 2012 at 2:46 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Sep 6, 2012 at 2:48 PM
sympmarc wrote:

Ah, jQuery 1.8. I've had another report of an issue with 1.8 and SPCascadeDropdowns. See the second and third (at the moment) comments here:
http://spservices.codeplex.com/wikipage?title=$().SPServices.SPCascadeDropdowns&referringTitle=Documentation
(I
wish people would post these comments in the Discussions! I don't get alerts from the documentation comments.)

I'll create an issue in the Issue Tracker and look into it. In the meantime, can you try jQuery 1.7.x?

M.


Hey Marc,

Just tried jQuery 1.7.2, and it works!
Also, thanks gkoliver, that solved my problem perfectly.

Coordinator
Sep 6, 2012 at 3:04 PM

I'll try to get a fix into 1.7.2. I'm sure that you aren't the only one who will run into this.

M.

Coordinator
Sep 6, 2012 at 9:04 PM
Edited Sep 6, 2012 at 11:15 PM

Guys:

I 've got a fix for this that I think will work. Would you mind testing it out?
http://spservices.codeplex.com/releases/view/81401

M.

Sep 6, 2012 at 9:13 PM
sympmarc wrote:

Guys:

I 've got a fix for this that I think will work. Would you mind testing it out?
http://spservices.codeplex.com/releases/edit/81401

M.


It's a slow couple of days at work, so I don't mind. However, I'm getting a Project Security Error notice when I follow that link.

Coordinator
Sep 6, 2012 at 11:15 PM

Sorry about that. Corrected link above and here:
http://spservices.codeplex.com/releases/view/81401

M.

Sep 7, 2012 at 5:27 AM

Hi Marc, sorry I didn't post my comments in Discussions.

I just tried jquery.SPServices-0.7.2BETA2.js with jquery-1.8.1.min.js and it is working as how it should be. Thanks a lot for the fix!

Sep 7, 2012 at 2:36 PM

Yep! Like systemX said, it's working now. Thanks a lot Marc!

Mar 12 at 7:44 PM
It is not working for me in Ie8
Coordinator
Mar 12 at 10:29 PM
Um, yeah. But what is happening? Same questions I asked you in the other thread. I can't help you without any info.

M.
Mar 15 at 6:13 PM
Hi ,

Please find below my issue and scenario explanation. Since i have no option to attach the text file . I am posting the entire scenario and clear explanation.

Here is the clear explanation..

I have 4 lists
1) Phase 2) Gate 3) Nation 4) Tally
***********************************
Data In the Phase List
************************************

ID   Phase

1    disco     

2    demat
 
3    dev

4    Department
**************************************
Data in Gate List
***************************************

ID        Gate       Phase --> (Lookup of phase list)

1         Idea       disco

2         Mary       disco

3         Ref        disco

4         AST        demat  

5         test       demat

6         up          dev

7        launch       dev

8         any         Department
******************************************************  
Data in nation  List
******************************************************

ID   Nation

1     USA

2     Australia

***********************************************************
******************************************************  
Data in Tally List
*****************************************************

ID   Tally    Gate (Lookup Gate List)       Nation (Lookup nation List) 

1    Mydata    Idea                          USA

2    TES       Mary                          Australia

3    REF       Mary                          USA

4   UDF       Mary                           USA

*******************************************************************
In shared Document library I have created Lookup columns Like below
1) Phase (Lookup of Phase List)

2) Gate (Lookup of Gate List)

3) Tally (Lookup of Tally List)

4) Nation (Lookup of Nation List)
Now I want cascading like below

Phase--> Gate--> Tally-->Nation


The below script is not working in Ie when Tally has 20+ items.. I.e When Tally (Lookup feild) has 20+ items then When Tally is selected organization cascading is not working.
The same is working fine in Google Chrome and Firefox.Can you please Help me ..
<script src="/Style%20Library/jquery-1.8.3.min.js"></script>
<script language="javascript" src="/Style%20Library/jquery.SPServices-0.7.2.min.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">


$(document).ready(function() {

$().SPServices.SPFilterDropdown({
 
 relationshipList: "Phase",
 relationshipListColumn: "Title",
 relationshipListSortColumn: "ID",
 columnName: "Phase",
 CAMLQuery: "<Neq><FieldRef Name='Title' /><Value Type='Text'></Value></Neq>",
 debug: true // Debug mode on while we're developing
});


$().SPServices.SPCascadeDropdowns({
            relationshipWebUrl: $().SPServices.SPGetCurrentSite() + "/Lists",
            relationshipList: "Gate",
            relationshipListParentColumn: "Phase",
            relationshipListChildColumn: "Title",
            parentColumn: "Phase",
            childColumn: "Gate",
                        CAMLQuery: "",
            debug: true
        });

$().SPServices.SPCascadeDropdowns({
            relationshipList: "{AAE185DD-DAAB-4CA9-9CD5-5BB32BF78318}",---->(Tally list GUID)
            relationshipListParentColumn: "Gate",
            relationshipListChildColumn: "Title",
            parentColumn: "Gate",
            childColumn: "Tally",
            relationshipListSortColumn: "count",
                        CAMLQuery: "",
                        
            debug: true
               });
    $().SPServices.SPCascadeDropdowns({
            relationshipWebUrl: $().SPServices.SPGetCurrentSite() + "/Lists",
    
            relationshipList: "{AAE185DD-DAAB-4CA9-9CD5-5BB32BF78318}",---->(Tally list GUID)
            relationshipListParentColumn: "Title",
            relationshipListChildColumn: "Nation",
            parentColumn: "Tally",
            childColumn: "Nation", 
                         CAMLQuery: "",
            debug: true
});




});</script>

Thanks,
Sandy
Coordinator
Mar 15 at 6:55 PM
Sandy:

My first suggestion would be to upgrade to SPServices 2014.01. You're quite a few versions back. BYW, you can use the listName (like "Tally") rather than the GUIDs. It makes your code more portable, and certainly easier to read and maintain.

I think the problem probably lies in your list structures. I'd be surprised if it were to work differently in different browsers.

Your Nations list should have a Tally column which is a lookup to Tally.Title if you want that cascading to work. You're storing the relationships for both Tally - > Gate and Nation -> Tally in the Tally list, which isn't fully relational. The SPCascadeDropdowns function needs to see the parent -> child relationship list unambiguously in each relationshipList.

M.
Mar 16 at 3:34 PM
Edited Mar 16 at 3:36 PM
Thanks,

But i have the nation column as lookup in Tally List which is same as you have said. It is working fine if my Tally column have less than 20+ items ..Also I tried with jquery.SPServices-2014.01.js the same result.

Thanks,
Sandy
Mar 17 at 2:20 PM
Any luck on my scenario????... Please help me on this
Coordinator
Mar 17 at 7:42 PM
Sandy:

I think you're going to have to do some debugging.

M.