title: Jquery - how to the set value for select option dropdown without using .change() to trigger the set value operation
body: <p>So I have a dropdown which is within a form just like below:</p>
  <pre><code>&lt;form id=&quot;formA&quot; action=&quot;John/Doe&quot; method=&quot;post&quot;&gt;
      -hidden input with value-
      &lt;select name=&quot;Letters&quot; id=&quot;Letters&quot;&gt;
          &lt;option value=&quot;1&quot;&gt;A&lt;/option&gt;
          &lt;option value=&quot;2&quot;&gt;B&lt;/option&gt;
          &lt;option value=&quot;3&quot;&gt;C&lt;/option&gt;
          &lt;option value=&quot;4&quot;&gt;D&lt;/option&gt;
      &lt;/select&gt;
  &lt;/form&gt;
  </code></pre>
  <p>So my situation is once I make a selection on the dropdown, it will trigger a submit form action like below:</p>
  <pre><code>$(document).on('change', '#Letters', function() {
      // here I am submitting the form whenever the ajax call success
      $.ajax({
          type: &quot;Get&quot;,
          url: &quot;sample/url&quot;,
          success: function(data){
              console.log(data);
              $('#formA').submit();
          }
      });
  });
  </code></pre>
  <p>Now I have another ajax call, when this ajax call is completed, I need to set the select value for this same dropdown list, I tried it with <code>$('#Letters').val(newValue).change()</code> just like below.</p>
  <pre><code>$.ajax({
      type: &quot;POST&quot;,
      url: &quot;sample/url&quot;,
      data: {sampleData}
      success: function(data){
          console.log(data);
      },
      complete: fuinction(){
          $('#Letters').val(newValue).change();
      }
  });
  </code></pre>
  <p>However, this <code>.change()</code> will trigger the ajax call above again which is not something that I want. So I guess cannot use <code>.change()</code> here.</p>
  <p>The reason I am doing this is that I wanted this value for the next form submit action.
  If I don't set this value after this 2nd ajax call, when I do next form submit, I got <code>null</code> values.</p>
  <p>I also tried <code>$(&quot;#Letters option[value=&quot; + thatOptionValue + &quot;]&quot;).attr('selected', true)</code>  But this one is not setting the value to the dropdown list at all. My controller is getting null from this.</p>
  <p>It seems to me only when using <code>.change()</code> then it will do the set value operation. Is there any other solution to set the value without using <code>.change()</code>?</p>
  <p>Any help will be appreciated!</p>