Re: How to pass a value from a Django View to a JQuery Slider bar.

2013-03-07 Thread 7equivalents
> > Thankyou Daniel, That's my name too I appreciate that, it clears > things up and now I understand why the tinkering I did worked! > Thankyou Tom, Gabriel, and everyone for the help... Please follow my next post where I seek help one more time(Need slider to write to database), after

Re: How to pass a value from a Django View to a JQuery Slider bar.

2013-03-07 Thread Daniel Roseman
On Thursday, 7 March 2013 07:58:27 UTC, 7equiv...@gmail.com wrote: > Now that I have that part working, I would like to make since of what was > going on and why it didn't work in the first place. I have a question... > > Let's say > (1) a page is requested, and the View renders_to_response a te

Re: How to pass a value from a Django View to a JQuery Slider bar.

2013-03-06 Thread 7equivalents
Now that I have that part working, I would like to make since of what was going on and why it didn't work in the first place. I have a question... Let's say (1) a page is requested, and the View renders_to_response a template (2) this template uses a {% include 'second_template.html' %} Does th

Re: How to pass a value from a Django View to a JQuery Slider bar.

2013-03-06 Thread 7equivalents
Hey, Thanks alot I tried to do that before and it didn't work(the slider bar disappeared) and on your suggestion tried again, still didn't work, however since you suggested it, I knew it had to be the right track, so I got rid of the variable in the Javascript and the slider bar came back,

Re: How to pass a value from a Django View to a JQuery Slider bar.

2013-03-06 Thread Tom Evans
On Tue, Mar 5, 2013 at 6:48 PM, <7equivale...@gmail.com> wrote: > Alright guys, thanks for the input, I need something a bit more specific to > my case due to my ignorance on the subject at hand, so I am posting the code > for my View, Template, and JQuery. So, basically I want to take the slider

Re: How to pass a value from a Django View to a JQuery Slider bar.

2013-03-05 Thread 7equivalents
Alright guys, thanks for the input, I need something a bit more specific to my case due to my ignorance on the subject at hand, so I am posting the code for my View, Template, and JQuery. So, basically I want to take the slider1 object value in the View, and place it in the Javascript where va

Re: How to pass a value from a Django View to a JQuery Slider bar.

2013-03-05 Thread Tom Evans
On Tue, Mar 5, 2013 at 4:57 PM, <7equivale...@gmail.com> wrote: > Well, I definitly can't just throw a variable into the Javascript using the > {{ }} tags. I tried it and it didn't work. I'm sure Shawn Milochik is > correct about consuming the view with AJAX, however that is going to take > someti

Re: How to pass a value from a Django View to a JQuery Slider bar.

2013-03-05 Thread Gabriel
You could use some small

Re: How to pass a value from a Django View to a JQuery Slider bar.

2013-03-05 Thread 7equivalents
Well, I definitly can't just throw a variable into the Javascript using the {{ }} tags. I tried it and it didn't work. I'm sure Shawn Milochik is correct about consuming the view with AJAX, however that is going to take sometime to learn and explore, as I am novice at this. It seems there shoul

Re: How to pass a value from a Django View to a JQuery Slider bar.

2013-03-04 Thread Michael Pimmer
I usually keep a separate .js file in my templates where I set such javascript variables (preferrably as a hash or module). You can directly include it in the base.html template so you don't make 2 requests out of it. The main javascript functionality should definitely go to the static files tho

Re: How to pass a value from a Django View to a JQuery Slider bar.

2013-03-04 Thread 7equivalents
Yes, Thankyou for helping me clean up my line of questioning, That is exactly what I want to know, can I use the {{ }} tags to do this, and can they be placed in a seperate .js file. On Monday, March 4, 2013 1:50:39 PM UTC-5, Gabriel wrote: > > If I understood it right, I think it would be enoug

Re: How to pass a value from a Django View to a JQuery Slider bar.

2013-03-04 Thread Gabriel
If I understood it right, I think it would be enough to serve the javascript with the initialization value hardcoded in it, right? Like using {{ }} tags. Is there a way to do this if there's a separate .js file? - Gabriel On Mon, Mar 4, 2013 at 1:41 PM, Shawn Milochik wrote: > Probably consume

Re: How to pass a value from a Django View to a JQuery Slider bar.

2013-03-04 Thread Shawn Milochik
Probably consume the view with AJAX, doing a POST on the change event of the slider. http://api.jquery.com/category/ajax/ Put your result in a dictionary within your view and return it as JSON: return HttpResponse(json.dumps(result), mimetype="application/json") -- You received this message be

How to pass a value from a Django View to a JQuery Slider bar.

2013-03-04 Thread 7equivalents
Hello, my goal is to use a Django powered website to control the brightness of a light. I am using a JQuery slider bar as a dimmer switch. When the JQuery slider bar loads, I need it to iniciate to a value I have in my database. I already have my View, Model, and Template setup, and can pass va