Dynamically set n_maxValue

DHTML component for the websites that adds vertical and horizontal trackbar capability to the HTML forms similarly to the controls widely used in desktop applications. The position of the handler is translated into the value from specified range and placed in existing input box of the HTML form.

Dynamically set n_maxValue

Postby robhillis » Tue Apr 09, 2013 12:34 pm

I found this in the old forum but I am unsure of how to implement. I am new to JS.
http://www.softcomplex.com/forum/viewthread_4828/

Where does the following need to be placed?

o_slider.n_maxValue = n_someNewValue;
o_slider.n_pix2value = o_slider.n_pathLength / (o_slider.n_maxValue - o_slider.n_minValue);

Does that go in the JS file or does that go somewhere on the form?

thankyou!
robhillis
 
Posts: 2
Joined: Tue Apr 09, 2013 12:31 pm

Re: Dynamically set n_maxValue

Postby tigra » Wed Apr 24, 2013 10:42 am

The question was about changing the values dynamically (i.e. after the slider initialization)
This is the code that you call at any time to set the new values. This is likely going to be inside of your event handler.
tigra
Site Admin
 
Posts: 30
Joined: Fri Jun 29, 2012 12:06 pm

Dynamically set n_maxValue

Postby LonnieUsem » Mon Jun 22, 2015 9:40 pm

Hello out there,

I got a JForm and I got some fields in there. I would like to disable a field, if the value of another field is "0". I know that I can do that by preparing the form while loading, but I want to solve that "live", so if the user clicks around, the readonly should immediately be set or unset.

How can I solve this? I guess I have to do some JQuery?
LonnieUsem
 
Posts: 1
Joined: Sat Jun 20, 2015 4:11 am

Re: Dynamically set n_maxValue

Postby tigra » Thu Jul 16, 2015 12:04 pm

You'll need to attach onchange event handler to the input element that you want to monitor (master) to be zero or not.
In that event handler you disable or enable dependent inputs (slaves) based on the new value of the master.

If master happens to be Tigra Slider Control then use onChange event of PRO version to monitor its state.
There's a sample for that: http://www.softcomplex.com/products/tig ... nmove.html
tigra
Site Admin
 
Posts: 30
Joined: Fri Jun 29, 2012 12:06 pm


Return to Tigra Slider Control Product Family

cron