Sp.js Is not loading in Application pages

Unable to get property 'get_current' of undefined or null reference  is getting while running application page.
<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
<SharePoint:ScriptLink ID="ScriptLink2" Name="SP.js" runat="server" OnDemand="true" Localizable="false" />
<script type="text/javascript" src="/_layouts/15/1033/TCSU/Scripts/jquery-1.6.1.min.js"></script>
<%--<SharePoint:ScriptLink ID="ScriptLink3" Name="~/_layouts/15/1033/TCSU/Scripts/jquery-1.6.1.min.js" runat="server" OnDemand="true" Localizable="false" />--%>
</asp:Content>
<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
<script type="text/ecmascript" language="ecmascript">
    var lic;
    $(document).ready(function () {
        $('select[id*=field_value]').bind('change', function (e) {
            var discipline = $(this).val();
            $('input[id*=field_LocationVehicle]').val('');
            if (discipline != "") {
                $('input[id*=field_Discipline]').val(discipline);
                alert("method calling LoadLocationVehicles");
                SP.SOD.executeFunc('sp.js', 'SP.ClientContext', LoadLocationVehicles(discipline));
                //  ExecuteOrDelayUntilScriptLoaded(myCallback, "SP.js");
            } else {
                $("select[id*=lbLocationVehicles] > option").remove();
        $('select[id*=lbLocationVehicles]').bind('change', function (e) {
            var discipline = $(this).val();
            $('input[id*=field_LocationVehicle]').val(discipline);
    function LoadLocationVehicles(descipline) {
        alert("method called...");
        $("select[id*=lbLocationVehicles] > option").remove();
        var currctx =  SP.ClientContext.get_current();
        var targetList = currctx.get_web().get_lists().getByTitle('Disciplines');
        var query = "<View><Query><Where><Eq><FieldRef Name='Discipline'/><Value Type='Text'>" + descipline + "</Value></Eq></Where></Query></View>";
        var cq = new SP.CamlQuery();
        cq.set_viewXml(query);
        lic = targetList.getItems(cq);
        currctx.load(lic);
        currctx.executeQueryAsync(Function.createDelegate(this, getAllLocationsSuccess),
                        Function.createDelegate(this, getAllItemsFailure));
    function getAllDocumentsSuccess(sender, args) {
        var listEnumerator = lic.getEnumerator();
        while (listEnumerator.moveNext()) {
            $('input[id*=field_CDRLList]').val(listEnumerator.get_current().get_item("Title"));
    function getAllLocationsSuccess(sender, args) {
        var listEnumerator = lic.getEnumerator();
        while (listEnumerator.moveNext()) {
            var locationVehicle = listEnumerator.get_current().get_item("Title") + " - " + listEnumerator.get_current().get_item("Code")
            AddItem(locationVehicle, locationVehicle);
    function getAllItemsFailure(sender, args) {
        alert('Failed to get list items. \nError: ' + args.get_message() + '\nStackTrace: ' + args.get_stackTrace());
    function AddItem(text, val) {
        // Create an Option object
        $('select[id*=lbLocationVehicles]').append($('<option></option>').val(val).html(text));
</script>
</asp:Content>
Error message : Unable to get property 'get_current' of undefined or null reference
Amar
Master page JavaScript file  :
<SharePoint:ScriptLink language="javascript" name="core.js" OnDemand="true" runat="server" Localizable="false" />
 <SharePoint:ScriptLink language="javascript" name="menu.js" OnDemand="true" runat="server" Localizable="false" />
 <SharePoint:ScriptLink language="javascript" name="callout.js" OnDemand="true" runat="server" Localizable="false" />
 <SharePoint:ScriptLink language="javascript" name="sharing.js" OnDemand="true" runat="server" Localizable="false" />
 <SharePoint:ScriptLink language="javascript" name="suitelinks.js" OnDemand="true" runat="server" Localizable="false" />

I added following line script into my code then , it is working fine.  
<
asp:ContentID="PageHead"ContentPlaceHolderID="PlaceHolderAdditionalPageHead"runat="server">
<scripttype="text/javascript"src="/_layouts/15/sp.runtime.debug.js"></script>
<scripttype="text/javascript"src="/_layouts/15/sp.debug.js"></script>
<scripttype="text/javascript"src="/_layouts/15/sp.init.js"></script>
<scripttype="text/javascript"src="/_layouts/15/init.js"></script>
<scripttype="text/javascript"src="/_layouts/15/1033/ABC/Scripts/jquery-1.6.1.min.js"></script>
</
asp:Content>
Amar

Similar Messages

  • When I click on a link that opens up automatically in a new window (ie internet banking), it will not load at all.Page remains blank.

    Links that open in new windows do not load. The page remains blank. I have downloaded other web browsers and these pages all work with these browsers. I have been using firefox for years and this has only started happening in the last month or so. Is there an update that can fix this? I have also uninstalled and then reinstalled firefox and still the same thing.
    There are no error messages, just a picture of a white sheet of paper in the top left hand corner with the writing "search book marks and history". New tabs are working, it's just the new windows that won't load.

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    You can use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    You have to close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")

  • After upgrading to 9.0.1 Mozilla Firefox for my pc, Firefox will not load any web pages.

    After upgrading to 9.0.1 Mozilla Firefox on my pc, Firefox will not load any web pages whatsoever, not even itself. My OS is Windows Vista 64. Thanks for any help. (Having to use Internet Explorer presently.)

    Perform the suggestions mentioned in the following articles:
    * [https://support.mozilla.com/en-US/kb/Template:clearCookiesCache/ Clear Cookies & Cache]
    * [[Troubleshooting extensions and themes]]
    * Update All your Firefox Plugins -> [https://www.mozilla.org/en-US/plugincheck/]
    ** '''When Downloading Plugins Update setup files, Remove Checkmark from Downloading other Optional Softwares with your Plugins (e.g. Toolbars, McAfee, Google Chrome, etc.)'''
    Check and tell if its working.

  • Firefox will not load any web pages

    Firefox will not load any web pages. I have tried every suggestion on the support page, deleted the program and reinstalled it 4 times, and ran a malware scan. None of these have solved the problem.

    Hi JessN37,
    We've got a whole [https://support.mozilla.org/en-US/kb/web-pages-dont-load troubleshooting section on failure to load pages]. Have you looked through any of that information? There is a ton of useful stuff there.
    Hopefully this helps!

  • I have ipad mini, safari is not loading, cannot open page because server stopped responding??? help

    I have ipad mini, safari is not loading, cannot open page because server stopped responding??? help

    i did bills paid!!! lol  just noticed cannot connect to app store either!!

  • My internet explorer is not loading any web pages.

    My internet explorer is not loading any web pages. Other browser rather than IE is working fine. Tried with reseting but it didn't work. Can anyone help me for this.Thanks

    Hi,
    Have you tried to open Interent Explorer (No Add-ons), how is the result?
    Please refer to this tutorial to troubleshoot:
    "Internet Explorer cannot display the webpage" error
    http://support.microsoft.com/kb/956196
    In addition, Did you configure any proxy ever?
    Karen Hu
    TechNet Community Support

  • I updated my mac book pro to mountain lion recently and my safari is not loading few web pages including apple sites please help me

    i updated my mac book pro to mountain lion recently and my safari is not loading few web pages including apple sites please help me

    I have this problem too but it seems pot luck and only like 5% of the time, the website will say the page is loaded but the page is just blank white...refreshing does not work and I have to go back and navigate to the page again

  • Absence history is not loading in sshr page

    Absence history is not loading in sshr page
    * For a employee the absence history is not displaying
    * Data for the employee is in table per_absence_attendances

    Hi,
    thanks for your update.
    We have checked your action plan.But 'Refresh Employee Directory' program not available in System adminstrator Responsibility.
    We are using Oracle Apps 12.1.3 Ora DB : 11.2.0.3
    Regards
    Venugopal.S

  • Jquery ui css is not loading in my page, i done this using client library....i tried to check using

    jquery ui css is not loading in my page, i done this using client library....i tried to check using firefox.. firebug addon..the css is showing as empty...so finall css is not calling can you please suggest the solution for this...

    Thanks for ur response...I followed the same link what you suggested for me...
    actually i try to display the buttons in  jquery ui buttons format but it is showing as normal buttons..so i checked uisng firebug ..here css showing as empty.....
    please suggest the same..
    In css.txt.. i write css file names like the below..please confirm is it correct or not
    jquery-ui.min.css
    jquery-ui.css
    Thanks in advance...

  • Firefox will not load any internet pages on my Linux operating system computer after I upgraded firefox. Any suggestions?

    I have a Linux operating system. I attempted to upgrade or update firefox and my mozilla will not load any internet pages. I am positive that I have the wireless connection connected. Any solution to help me get back on the internet?

    Perform the suggestions mentioned in the following articles:
    * [https://support.mozilla.com/en-US/kb/Template:clearCookiesCache/ Clear Cookies & Cache]
    * [[Troubleshooting extensions and themes]]
    * Update All your Firefox Plugins -> [https://www.mozilla.org/en-US/plugincheck/]
    ** '''When Downloading Plugins Update setup files, Remove Checkmark from Downloading other Optional Softwares with your Plugins (e.g. Toolbars, McAfee, Google Chrome, etc.)'''
    Check and tell if its working.

  • Safari will not load any web pages. how do i fix it?

    safari on my macbook pro will not load any web pages. the loading bar will not go past http:// and no matter how long i leave it, it still will not load. please help me!

    How old is your MBP?
    Do you have APP?
    Does this happen all the time? Does it happen on a specific site? What internet connection do you have?

  • Firefox 10.0.2 on a Samsung Continuum 2.1 will not load any web pages.

    Just reinstalled and still no luck. Will not load any web pages or complete any searches. Just brings up a blank page and adds a blank tab. Tried on WiFi and 3G, neither will work. Installed the Phony add-on and set the user agent to Android as suggested in the help, but no change. I'm using GO Launcher EX, but reverted to the stock launcher to see if that helped, still no luck.

    Unfortunately the Firefox App is not working properly with 2.1 systems. HEre are the bugs to follow their statusesȘ
    https://bugzilla.mozilla.org/buglist.cgi?order=Importance;list_id=2400841;short_desc=2.1;query_format=advanced;short_desc_type=allwordssubstr;product=Fennec;product=Fennec%20Native

  • I can not load a web page? I have gone through the help pages so many times. Removed, reinstalled, checked preferences, checked security settings. Can anyone offer a possible solution?

    I can not load a web page? I have gone through the help pages so many times. Removed, reinstalled, checked preferences, checked proxies, cleared cache, checked security settings. I have tried disabling plugins and addons. Can anyone offer a possible solution? On Mac.

    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    *Firefox > Preferences > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox > Preferences > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *http://kb.mozillazine.org/Error_loading_websites
    *https://support.mozilla.org/kb/Error+loading+web+sites

  • Comcast just replaced my cable modem/wireless router.  All devices connect properly except my iPhone 4.  It shows itself to be connected to the network, but it does not load any web page.  Resetting the iPhone does not solve the problem.  Any suggestions?

    Comcast just replaced my cable modem/wireless router.  All devices connect properly except my iPhone 4.  It shows itself to be connected to the network, but it does not load any web page.  Resetting the iPhone does not solve the problem.  Any suggestions?

    Thank you for your response.
    I had rebooted the router (several times, actually), to no avail.
    I do not know the answer to whether MAC filtering is enabled on the router.  Have tried to find info about that, but unsuccessfully.  Router is an Arris TG852G, supplied by Comcast.  I would be surprised if MAC filtering were the issue, since in addition to the computer, we have successfully connected several other devices to the wifi, namely an iPad, a Android phone and a Kindle Fire - all able to access internet pages through the wifi, and all without a need to add the device to a MAC address whitelist.  To add to the mystery, the Comcast tech was able to connect his iPhone 4 to my network and access web pages.  He was unable to connect my iPhone, however, after trying for some time.
    I seem to recall reading somewhere that an iPhone cannot connect to a wireless "n" router, only "b" or "g".  The Arris router is described as a n/g/b compliant router, and as noted the Comcast tech was able to connect his iPhone, so don't know why that would be the issue here.
    By the way, my iPhone does connect wirelessly to my network at home.  This difficulty is at a second home.
    Any other thoughts would be appreciated.

  • ScriptLink tag not working for application page sharepoint 2010

    <ScriptLink> tag not working for application page sharepoint 2010 for including javascript in application page, it appends either 1033 or _layout to path specified for javascript.But javascripts are located in custom document library on site and not
    in _layouts folder.
    Please help and explain in details as I tried lot on this.

    Hi,
    Use the following line of code
    <SharePoint:Scriptlink runat="server" Name="~sitecollection/Style Library/[YOUR SITE]/js/functions.js" Language="javascript" />
    Thanks,
    Vivek
    Please vote or mark your question answered, if my reply helps you

Maybe you are looking for

  • Need a Advice for move from  peoplesoft to SAP BI

    Hi Experts, I am working as a peoplesoft Technical consultant in a MNC past 2 yrs . I want to change my domain to SAP BI. I need a suggestion. SAP BI Training already completed. But in my it's not possible for change so please advice how i will highl

  • No catalog in Adobe Media Player

    Recently my AMP ver. 1.8 opens with empty home page and catalog. No more videos! Is this a problem with my installation or my mac or support for the contents has been discontinued? Someone else experiments this problem? Thank you Raimondo Di Bella

  • Initial View of a PDF

    Is there any way to have more than one panel display in the initial view of a pdf? Say, to show the bookmarks and attachments upon opening the pdf?

  • Mail app crashes when importing mail from Netscape.

    I have been using Netscape 4 in classic mode for years. I have a HUGE inbox that I need to keep for reference purposes and I would like to switch to using Mail. Mail crashes when I try to import my mailboxes. I moved all my mail to the newest Netscap

  • MacBook late '08, Lion, Magic Mouse won't scroll

    The mouse was working then suddenly won't scroll. Tried deleting the pref and no luck. Tried restoring back to Snow Leopard from SuperDuper and the mouse worked fine. Reinstalled Lion and it won't scroll. Don't have USB Overdrive on the machine. Susp