2

I want to detect with JavaScript or jQuery what are the Regional Settings of the current user in NewForm.

This is want I want to get from user: enter image description here

1 Answer 1

3

try this one:

var url = ctx.HttpRoot+"/_layouts/regionalsetng.aspx?Type=User";
$.get(url,function(data){
    $(data).find("select[name=ctl00$PlaceHolderMain$ctl00$ctl00$DdlwebLCID]").find(":selected").each(function(){
        var lcid  = $(this).attr("value");
        var cultureInfo  = $(this).text();
    });
});

http://social.msdn.microsoft.com/Forums/sharepoint/en-US/6a33dd2b-c138-4c86-a002-42d08d941362/retrieve-regional-settings-by-javascript?forum=sharepointdevelopmentlegacy

1
  • can somebody post the full implementation? I am calling this method in my custom js and sp.js is giving runtime error. Commented Jul 20, 2015 at 15:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.