This topic is locked
[SOLVED]

 get control on dependented values

12/29/2017 7:23:58 AM
PHPRunner General questions
R
Rigmantas author

Hi, I want to multiplication values on change it.

there is my script:

//////////

function myFunkcija() {

var x = Number(ctrlpak.getValue());

var y = Number(ctrlkartojimo_laikas.getValue());

document.getElementById("sumai").innerHTML ="Viso žinučių: " + (y
'60') / x;

}
ctrlkartojimo_laikas.on('change', myFunkcija);

ctrlpak.on('change', myFunkcija);*

////////////

ctrlkartojimo_laikas.on('change', myFunkcija) - work normal

ctrlpak.on('change', myFunkcija)- not worked. I found that is problem because it is dependent on first value

Can you help me.

Regards,

Rimantas

Happy new year!!! <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=25246&image=1&table=forumtopics' class='bbc_emoticon' alt=':rolleyes:' />

admin 1/1/2018

I just wanted to say that this kind of question cannot be answered by someone who doesn't have access to your application. What you need to do is to find what exactly is happening there in your code.

  1. Check for Javascript errors if any:

    https://xlinesoft.com/phprunner/docs/troubleshooting_javascript_errors.htm
  2. If there are no Javascript errors there must be some sort of logical error. To solve an issue like this you need to set a breakpoint and step through your code, examining variables after each step to see what exactly doesn't work.

R
Rigmantas author 1/2/2018

Hi,

I did it - I did not show any errors. If I disable a dependent, all its OK.

Regards,

Rimantas

admin 1/2/2018

If there are no errors you need to follow tip #2

R
Rigmantas author 1/3/2018

Onchange he does not do anything.

There is template from my project:

Link

Tables

Maybe you will have a time.

Thank you

Regards,

Rimantas

emendoza 1/6/2018

@Rimantas,

apparently its function does not have logic, because, when reviewing its tables aa_laikas, aa_laikas_val, the two tables have the same values.

then, you are multiplying "X" by 60 and then divide by "Y", assuming that "X" and "Y" have the same values, you will always get the value "60".

You would have to send screenshots of what you really want to be able to give you inspiration.

Also, I recommend buying a support plan, https://xlinesoft.com/buy_support.htm



Onchange he does not do anything.

There is template from my project:

Link

Tables

Maybe you will have a time.

Thank you

Regards,

Rimantas

R
Rigmantas author 1/8/2018

I do not understand - I have bought a silver support plan

This function have logic, because it work when dependent disabled.

I found solution: create new values and depend on dependent values.

emendoza 1/10/2018

@Rigmantas, I saw the videos and you say "This function has logic, because it works:" then, what is the problem with your post?



I do not understand - I have bought a silver support plan

This function have logic, because it work:

Depndent value

Dependent disabled