sending the value of HTML checkbox to django view
<p>I have the following HTML page</p>

<pre><code>&lt;input type="checkbox" name="checks[]" value="1"&gt;REG_AGREED_SUITE01
  &lt;/label&gt;
   &lt;hr&gt;
  &lt;label class="checkbox"&gt;
  &lt;input type="checkbox" name="checks[]" value="2"&gt;REG_AGREED_SUITE02
  &lt;/label&gt;
   &lt;hr&gt;
  &lt;label class="checkbox"&gt;
  &lt;input type="checkbox" name="checks[]" value="3"&gt;REG_AGREED_SUITE03
  &lt;/label&gt;
</code></pre>

<p>I have a Django view like this</p>

<pre><code>cd1 = "&lt;command&gt;"
cd2 = "&lt;/command&gt;"
test_runner_path = "Abc - C:\git_new\evo_automation\ tests\TestRunner"
test_runner_path2 = "Def - C:\git_new\evo_automation\ tests\TestRunner"
STB = "VMS_01"
TestSuite = "REG_AGREED_SUITE02"
</code></pre>

<p>Right now I am passing TestSuite value manually from views. But I am trying like, If I select the checkbox from html page, It should replace the hard coded value in views and pass the parameter. Is there any way I can do it?</p>

<p>Use Jquery and ajax request to pass data to view:</p>

<pre><code>   $("checkbox").change(function(){
        $.post("path/to/url",
        {
            checkBoxValue: $("#CheckboxID").val()
        }
    });
</code></pre>

python html django jenkins