Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to pass jQuery variable from slider to url to PHP?
    primarykey
    data
    text
    <p>I am a beginner. I am using the <a href="http://www.filamentgroup.com/lab/update_jquery_ui_slider_from_a_select_element_now_with_aria_support/" rel="nofollow">Filament Groups jQuery UI slider</a>. I made two sliders and want to use the two corresponding variables in my PHP scripts. I want to pass the jQuery variables to my current url (http://url.com) to the new url (http://url.com/#slide1=7&amp;slide2=6) and read the url variables off into PHP variables ($var1=7, $var2=6).</p> <p>How would I create an anchor tag (#) for my jQuery variables?</p> <p>How can I pass the values to the url?</p> <p>How can I read the variables in the url to PHP variables?</p> <pre><code> &lt;script type="text/javascript"&gt; $(function(){ //demo 1 var num_var = $('select#num').selectToUISlider({labels:7}).next(); var allpha_var = $('select#allpha').selectToUISlider({labels:7}).next(); //demo 2 $('select#valueA, select#valueB').selectToUISlider(); //demo 3 $('select#valueAA, select#valueBB').selectToUISlider({ labels: 12 }); //fix color fixToolTipColor(); }); </code></pre> <p>HTML</p> <pre><code>&lt;form action="#"&gt; &lt;!-- demo 1 --&gt; &lt;fieldset&gt; &lt;select name="num" id="num"&gt; &lt;optgroup label="low"&gt; &lt;option value="1"&gt;1&lt;/option&gt; &lt;option value="2"&gt;2&lt;/option&gt; &lt;/optgroup&gt; &lt;optgroup label="mid"&gt; &lt;option value="3" &gt;3&lt;/option&gt; &lt;option value="4" selected="selected"&gt;4&lt;/option&gt; &lt;option value="5"&gt;5&lt;/option&gt; &lt;/optgroup&gt; &lt;optgroup label="high"&gt; &lt;option value="6"&gt;6&lt;/option&gt; &lt;option value="7"&gt;7&lt;/option&gt; &lt;/optgroup&gt; &lt;/select&gt; &lt;/fieldset&gt; </code></pre> <p>The finished product is similar to <a href="http://www.yummly.com/search#flavor.salty.max=0.6666666666666666&amp;flavor.salty.min=0&amp;q=cookie&amp;start=0" rel="nofollow">Example of what I want</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload