Loading ...
Sorry, an error occurred while loading the content.

30213Re: form post/get slider values

Expand Messages
  • roysterphil2002
    May 2, 2008
      super, thanks.

      --- In ydn-javascript@yahoogroups.com, "y_lsmith" <lsmith@...> wrote:
      >
      > --- In ydn-javascript@yahoogroups.com, "roysterphil2002"
      > <roysterphil2002@> wrote:
      > >
      > > I was just wondering how to get the YUI slider values so I can
      > > post/get it via a form. I am not too familiar with Javascript, but I
      > > think I should be able to pick it up with an HTML example. (Basically
      > > how am I going to use slider.getValue() function into HTML).
      > >
      > > Thanks much, I appreciate it.
      > >
      >
      > If you include a hidden input field on your page, you can assign its
      > value from the Slider
      >
      > <input type="hidden" id="foo" name="foo" value="">
      >
      > then in script
      >
      > var fooInput = YAHOO.util.Dom.get('foo');
      > slider.subscribe('change',function (newVal) {
      > fooInput.value = newVal;
      > });
      >
      > Or if you want the hidden input updated only on certain action, you
      > can do something like this:
      >
      > YAHOO.util.Dom.get('foo').value = slider.getValue();
      >
      > Hope this helps,
      > Luke
      >
    • Show all 3 messages in this topic