Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread Poll:
Author: Subject: getting the position?
geoffcox
Junior Member

Posts: 8
Registered: 7/25/2006
Member Is Offline
posted on 3/29/2007 at 11:01 PM Reply With Quote
getting the position?


Hello,

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?!

Cheers,

Geoff
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 3/30/2007 at 04:13 PM Reply With Quote

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.
View User's Profile View All Posts By User U2U Member
geoffcox
Junior Member

Posts: 8
Registered: 7/25/2006
Member Is Offline
posted on 3/30/2007 at 08:34 PM Reply With Quote

Quote:
Originally posted by tigra
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.


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 simplistic question?!

Cheers

Gepff
View User's Profile View All Posts By User U2U Member
geoffcox
Junior Member

Posts: 8
Registered: 7/25/2006
Member Is Offline
posted on 3/30/2007 at 09:24 PM Reply With Quote

Quote:
Originally posted by tigra
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.


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.

Cheers

Geoff
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 3/31/2007 at 01:21 AM Reply With Quote

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.
View User's Profile View All Posts By User U2U Member
geoffcox
Junior Member

Posts: 8
Registered: 7/25/2006
Member Is Offline
posted on 3/31/2007 at 07:59 AM Reply With Quote

Quote:
Originally posted by tigra
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.


Thanks for the ideas - will get working!

Cheers

Geoff
View User's Profile View All Posts By User U2U Member
geoffcox
Junior Member

Posts: 8
Registered: 7/25/2006
Member Is Offline
posted on 3/31/2007 at 12:43 PM Reply With Quote

Quote:
Originally posted by tigra
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.


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!

Cheers

Geoff
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 4/5/2007 at 07:53 PM Reply With Quote

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.
View User's Profile View All Posts By User U2U Member
Post new thread Poll:

Related Links:
Product Page
Product Demonstrations Live Demos
Multiple Designs
Equalizer
Free Download Free Download
Product Documentation Documentation:
Documentation Page
Change Log
Support Forum Support Forum

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004