Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: Just want to know if SP Services' Cascading Dropdown Function works with a custom list form inserted using SPD 2007?

$
0
0
Hi Guys,

It's been a while since I tried using Java on a SharePoint form.

I've recently created a form where certain rows in the form are hidden using jquery.

I've googled and modified a code I found on the net which basically ended up as such:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script type="text/javascript">

$(document).ready(function() {
    // add change handler
    $("select[title=Region]").change(function() {
        RegionChange();
    });
    // call the change function to set up form for first display:
    RegionChange();
    // ensure the <select> is created:
    EnsureSelectElement($("input[title=SAP_x0020_EE_x0020__x0023]")[0], "_Select");
    // and move to an un-hidden location (next to the RegionSelect <select> element):
    $("select[title=MasterSelect]").parent().append($("#_Select"));
});

function RegionChange()
{
    var thisVal =  $("select[title=Region]").val();
    if(thisVal == "US")
    {
        // show the all US related rows
        $(".US").show();
        $(".Asia_US").show();
        $(".Europe_US").show();
        // hide non US related rows
        $(".Asia").hide();
        $(".Europe").hide();
        $(".Asia_Europe").hide();
    }
    else if(thisVal == "Europe")
    {
        // show Europe related rows
        $(".Europe").show();
        $(".Asia_Europe").show();
        $(".Europe_US").show();
        // hide the SelectA row
        $(".Asia").hide();
        $(".US").hide();
        $(".Asia_US").hide();       
    }
    else 
        {
        // hide the SelectA row
        $(".Asia").show();
        $(".Asia_Europe").show();
        $(".Asia_US").show();
        // show the SelectB row
        $(".Europe").hide();
        $(".US").hide();
        $(".Europe_US").hide();
    }
}

</script>
I had to insert a custom form on SPD to be able to add Classes to the table rows to allow the code to hide it. And now that I want to implement a Cascading Dropdown List on this Form as well, Does SPServices works on version 1.4 jquery? or does using a higher version of jquery work with this code?

Thanks in Advance :-)

Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>