Just do this inside your slide callback:

$('#low').val(ui.values[0]);
$('#high').val(ui.values[1]);

On Jun 11, 5:47 pm, Oliver <[email protected]> wrote:
> Hi,
> I created a slider using
>
>         $(function() {
>                 $("#slider-range").slider({
>                         range: true,
>                         min: 0,
>                         max: 50000,
>                         values: [5000, 45000],
>                         step: 1000,
>                         slide: function(event, ui) {
>                                 $("#amount").val('€' + ui.values[0] + ' - €' 
> + ui.values[1]);
>                         }
>
>                 });
>                 $("#amount").val('€' + $("#slider-range").slider("values", 0) 
> + ' -
> €' + $("#slider-range").slider("values", 1));
>         });
>
> and it works like a charm.
>
> The user sees the values using <input type="text" id="amount" />. I
> will now need to pass ui.values[0] and ui.values[1] to use them in a
> MySQL query so I want to put them in hidden form fields. I tried all
> sorts of the get element by id things but i just messed up the code
> doing this.
>
> Could you please tell me how to fill <input type="text" id="low" />
> and <input type="text" id="high" /> with the right values?
>
> Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to