thanks, I have 2 options and I made with java script buttons that can transfer the lines of one option to another
now I want to pass all the lines of option2 to the server. On Thursday, April 2, 2015 at 7:17:19 PM UTC-5, Ilya Kazakevich wrote: > This tutorial is about client-side (JavaScript) while Python/Django is > server side:) > > What are you trying to do? Pass all options from HTML page to server side? > What for? > In most cases you want to pass the option selected by user to server. You > must first read about HTML forms and how to submit them, and then read > Django Forms tutorial: https://docs.djangoproject.com/en/1.8/topics/forms/ > > > > On Thursday, April 2, 2015 at 9:35:39 PM UTC+3, dk wrote: >> >> I have a option section in my webpage just display the names of some >> machines >> >> doing this tutorial I was able to get all the lines that appear in the >> "option" tag of my html. >> http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_select_options >> and I can get a big string that I can separate by comas. >> >> I was going to put that big long string as the last part of the url and >> use it with a get method such: >> >> url: mywebsite/myapp/?options=txt >> >> def profile_page(request): >> options = request.GET.get("options", "") >> #here parse the options string >> >> is this something recommended? or is a better smarter way? >> thanks =) >> >> >> -- 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 http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2d2a7ad8-5ffc-465d-8fff-b8d397c72f76%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.