getting the position?
geoffcox - 3/29/2007 at 11:01 PM
I have a single horizontal slider working but I would like to be able to get the postion value into a variable. I don't want the value to be seen but
to be able to send it by email.
Any pointers please?!
tigra - 3/30/2007 at 04:13 PM
The slider is on the client side, the emails are usually generated by the server. You'll need to save the value of the slider in the input box
(visible or hidden) and submit the form to the server (POST method), you can put the value in the address and submit the request to server or you can
do it AJAX style. On the server you'll need to have the script that processes the request and generates the email. You'll probably need help from
experienced developer if above sounds greek.
geoffcox - 3/30/2007 at 08:34 PM
Thanks for the above. I can cope with the email side using formmail.cgi but re the first part - is it necessary for the slider value to go into the
input box? I don't want the figure to be visible and would just like to get it into a variable. The slider only works within a form? This may be a
geoffcox - 3/30/2007 at 09:24 PM
Following my other response - I have put together a file so that I have 2 sliders and the 2 results are sent to me by email but I would like to have
several pages each with 6 sliders on it. The user would position each slider and the values go into an array before moving to the next page. Once all
sliderson all pages have been positioned the last submit would send all the values to me by email.
So - how do I get the slider position values into an array?!
Hiding the boxes is OK.
tigra - 3/31/2007 at 01:21 AM
You'll need to either modify the slider's code to write directly to the array or you can use sliders with input boxes in the form and then collect
the values into the array on the form submit.
geoffcox - 3/31/2007 at 07:59 AM
Thanks for the ideas - will get working!
geoffcox - 3/31/2007 at 12:43 PM
having started on the above I am not clear how to do it! A few questions may show how little I know but ..
1. at which point in slider.js do I get n_value into an array?
2. if I go for the second approach how do I get the slider position values out of the input boxes?
3. if I have 3 pages with sliders on them I don't wish to submit 3 different forms - so how do I cope with that?
I know you are not there to write the code for me but a few pointers please!
tigra - 4/5/2007 at 07:53 PM
1. I'd do that at the time of the form submission (you need to get that stuff to the server at some point). You can add onsubmit event to the form
and do the job in it
2. Just access the values of the input boxes. var n_value = document.forms['formname'].elements['inputname'].value;
3. If you see all three pages at the same time (like in frames for example) you can collect the values from all three documents from single document
var n_otherValue = parent.frames['framename'].document.forms['formname'].elements['inputname'].value
if you go from one form to another you can as well submit the values to the server since you send the requests for the new page anyway. another way
would be to drag the values between the pages in browser cookies.
Back to forum: http://www.softcomplex.com/forum/