<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.aras.com/community/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Dropdown can not disable</title><link>https://www.aras.com/community/f/development/3518/dropdown-can-not-disable</link><description>Hi

Field Type use Dropdown I want to disable this dropdown, so write a method onFormPopulated event.

Method Code：

var sel_imie = $(&amp;#39;select[name=&amp;quot;_list&amp;quot;]&amp;#39;);
sel_imie.prop(&amp;#39;disabled&amp;#39;, true);

Chrome version&amp;#160;63.0.3239.108 first on load&amp;#160; can not disable</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Dropdown can not disable</title><link>https://www.aras.com/community/thread/1174?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 04:11:48 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:d1c90155-04b9-4e91-859f-030ac16b3083</guid><dc:creator>Michelle</dc:creator><description>This function OK

Thank you for replying.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dropdown can not disable</title><link>https://www.aras.com/community/thread/1176?ContentTypeID=1</link><pubDate>Mon, 08 Jan 2018 09:47:41 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:6f6e6a42-0ed3-4def-82c3-0e8acf398627</guid><dc:creator>Christopher Gillis</dc:creator><description>Hi Michelle,

You only need to pass in the name of the function as an argument to setTimeout.

Please see the example below.

&lt;pre&gt;&lt;code&gt;var innovator = document.thisItem.getInnovator();
setTimeout(myFunction, 100);
function myFunction()
{
var sel_imie = $(‘select[name=”_list”]’);
sel_imie.prop(‘disabled’, true);
}&lt;/code&gt;&lt;/pre&gt;


Chris

_________________________________

Christopher Gillis

Aras Labs Software Engineer&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dropdown can not disable</title><link>https://www.aras.com/community/thread/1170?ContentTypeID=1</link><pubDate>Sun, 07 Jan 2018 20:49:46 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:e80b9c71-f83a-403f-b7e5-d14eefdc010f</guid><dc:creator>Michelle</dc:creator><description>Hi Gillis

Aras Innovator Version 11.0 SP9  Build: 6549

How to use setTimeout(myFunction, 100) like this example?

onFormPopulated event

Code :

debugger;
var innovator = document.thisItem.getInnovator();

setTimeout(myFunction(), 100);

function myFunction()
{
var sel_imie = $(&amp;#39;select[name="_list"]&amp;#39;);
sel_imie.prop(&amp;#39;disabled&amp;#39;, true);
}

&amp;nbsp;

&amp;nbsp;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dropdown can not disable</title><link>https://www.aras.com/community/thread/1166?ContentTypeID=1</link><pubDate>Thu, 04 Jan 2018 15:26:31 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:d9f6779e-6b93-4227-98a2-f30304c70c40</guid><dc:creator>Christopher Gillis</dc:creator><description>Hello,

Could you please confirm which version of Aras Innovator you are using? In a local test, it seemed the dropdown had not yet loaded by the time my onFormPopulate event was called. I worked around this by using &lt;code&gt;setTimeout(myFunction, 100)&lt;/code&gt; to call my code that disabled the dropdown.

Could you try using a timeout to call your code to see if it resolves the issue you&amp;#39;re seeing?

Chris

_______________________________

Christopher Gillis

Aras Labs Software Engineer&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>