Hi Dimple, Your `url` is invalid. Views are exposed to the world via urls; in that, you define which URL will call which view.
If you're running Django on your machine, your URL should probably start with 'http://localhost:8000/the/url/for/your/view' -- although the `http` can be omitted, in which case the browser will use the current schema and `://localhost` can also be omitted, in which case the browser will request from the current server. On Mon, Jun 11, 2018 at 6:43 AM, Dimple Mathew <[email protected]> wrote: > *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 [email protected]. > To post to this group, send email to [email protected]. > 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 > <https://groups.google.com/d/msgid/django-users/07cc9e80-d30f-4578-82b5-abe38cff45ed%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- *Julio Biason*, Sofware Engineer *AZION* | Deliver. Accelerate. Protect. Office: +55 51 3083 8101 <callto:+555130838101> | Mobile: +55 51 <callto:+5551996209291>*99907 0554* -- 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 [email protected]. To post to this group, send email to [email protected]. 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/CAEM7gE2%3D9r_Qm9UpqJfRKYJNmYJD0Az3JxusJT4cWNeh1NBxVg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

