Your SAS programs, embedded in web apps and elsewhere

Select2 jquery component in SAS Stored Process

Reply
New Contributor
Posts: 2

Select2 jquery component in SAS Stored Process

Hi

 

I am using select2 component to dynamically fetch the data from a SAS dataset in a drop down which enables user to select multiple values. It works fine when i code it in normal HTML. However the same piece of code is not working when used inside the stored process. All other baisc components of html are working fine and are being surfaced properly when the stored process is executed on to the stored process web application.

 

 

<link href="C:\Users\Desktop\dist\css\select2.min.css" rel="stylesheet" />
<script src="C:\Users\Desktop\dist\js\select2.min.js"></script>
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>

<script src="C:\Users\Desktop\dist\js\select2.js"></script>
<script>
alert("i m here");
$(document).ready(function() { $("#e1").select2(); });
</script>

<script type="text/javascript">
$(".js-example-basic-multiple").select2();
</script>

 

Regards,

Mahesh

 

 

 

Contributor
Posts: 39

Re: Select2 jquery component in SAS Stored Process

Posted in reply to MaheshYadav
Hello Mahesh,

My guess would be that your stored process can't access JS files stored on your Desktop.
Also, you are referencing the same library twice. select2.js and select2.min.js are the same in terms of functionality. The second version is a minimified version where unnecessary whitespace is removed and references are substituted.

Please open the developer console (F12 in Chrome) and see if there are any errors reported. They should be self explanatory. If they are not, post them here.

Regards,
Vasilij
=======================================
For more information about {An}alytium, visit https://www.analytium.co.uk
Ask a Question
Discussion stats
  • 1 reply
  • 563 views
  • 1 like
  • 2 in conversation