*Once i select options in the drop-down, the scripts should be executed.*
*Index.html*

 <div class="col-xs-5 selectContainer">
        <select name="colors" class="form-control" multiple title="Choose 
Script">
            <option value="black" onclick="goPython()">US BANK</option>
            <option value="blue">BOKF</option>
            <option value="green">COMMERCE BANK</option>
            <option value="orange">MICHIAS</option>
            <option value="red">TD BANK</option>
            <option value="yellow">WELSFARGO</option>
            <option value="white">BOA</option>
        </select>
    </div>
</div>


 <script>
    function goPython(){
        $.ajax({
          url: "C:\mydjango\website\automation\script\USBANK.py",
        }).done(function() {
         alert('finished python script');;
        });
    }


Views.py


def lockbox(request):
    return render(request,'automation/lockbox.html')

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/07cc9e80-d30f-4578-82b5-abe38cff45ed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to