Re: How can my JQuery Sliderbar pass a value to the Veiw and cause the View to execute?
I'm guessing that the POST vs. GET issue was due to a missing CSRF token. I'm glad you got it working, though. -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: How can my JQuery Sliderbar pass a value to the Veiw and cause the View to execute?
[Solved] Thanks for the help, it helped me solve the problem and is much appreciated. I still have a few hiccups, like for some reason I had to change type:"POST" to type:"GET" for it to workand it doesn't always work(really bad with IE, better with Firefox). But I still need to study it and poke at it, and start new threads for those problems. This one is SOLVED! 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: How can my JQuery Sliderbar pass a value to the Veiw and cause the View to execute?
You'll need to attach something to the "change" event of your slider to execute a JavaScript function. The function would contain something like this: // $.ajax({ // url: your_url, // cache: 'false', // success: function (resp){ do_something(resp); }, // type: "POST", // data: your_data_here // }) Then your "success" function would contain (or call) the JavaScript to make whatever changes in the DOM you want to make. This is a minimal example. Once you have something working, you'll probably want to implement a way to prevent your function from firing too many times as someone is playing with the UI. -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: How can my JQuery Sliderbar pass a value to the Veiw and cause the View to execute?
Ok, thanks Shawn, still having a bit of a snag. I have read the JQuery doc on $.ajax, but still don't have a complete grasp... So here is my next question, I added this to my sliderbar script: var args = { type:"POST", url:"/slider/" } $.ajax(args); Would those two lines of code cause my slider_page View to execute (assuming of coarse the url is correct)? -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: How can my JQuery Sliderbar pass a value to the Veiw and cause the View to execute?
I think we've come all the way around to where my response is now appropriate. :o) https://groups.google.com/d/msg/django-users/kB27nmftPng/btPKtxvoumYJ Shawn -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
How can my JQuery Sliderbar pass a value to the Veiw and cause the View to execute?
I am trying to create my first Django AJAX App. I have a template that creates a JQuery slider bar. I also have a datamodel which has a sliderbarValue entry and a View that writes to it. I need to know how to make the Javascript call the View and pass it the slider bar value. Here is the template and javascript I have... {% block external %} {% endblock %} {% block content %} Intensity: $(function (){ $( "#slider_1" ).slider({ range: "min", value: {{ slider1.sliderValue }}, min: 0, max: 100, slide: function( event, ui ) { $( "#power" ).val(ui.value ); } }); $( "#power" ).val($( "#slider_1" ).slider( "value" ) ); return false; }); {% endblock %} -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.