title: How can I set the value of a JQuery slider based on a form submitted input field?
body: <p>Started looking at the <a href="http://docs.jquery.com/UI/Slider/slider#.22value.22value" rel="nofollow">API for the slider</a>, getting a little confused. I have a simple form, with one input, feeding into a "results" page that contains a slider. When the user slides the slider handle, the value changes (meaning the final value is computed in a function - input is added to a number)</p>
  
  <p>Right now, I have the value of the slider hard coded, but I'd like the value to be the actual value from the original forms input. Not sure how to get that done, but here's the function I am working with:</p>
  
  <pre><code>$(function() {
      $("#ds1").slider({
          orientation: "horizontal",
          step: 7,
          range: "min",
          max: 200,
          value: 50,
          slide: refreshTotal,
          change: refreshTotal
      });
  });
  </code></pre>
  
  <p>So the value is hard coded to 50, but I'd like an input field to control that value. The refreshTotal function handles the actual computation. It would be great to also set the max value too if that is handled the same way as this.</p>
  
  <p>I've searched on here and found a few examples of "real time" input's affecting the slider, and visa versa using keyup, etc. But I can't figure out how to set the value (perhaps using a getter), based on the form input field after the user hits submit, and JQuery handles the computation. </p>
  
  <p>I think this is a pretty simple thing, just can't seem to figure it out.</p>