This topic is locked
[SOLVED]

 Application will only work in Mozilla Firefox

12/23/2012 7:22:52 AM
PHPRunner General questions
J
joiresende author

Hello;

I have a page to add values ​​using two calculations on the fly, however they only work in Mozilla firefox browser,

In browsers internet explorer and google chrome only performs a calculation on the fly.

C
cgphp 12/23/2012

Post the code.

J
joiresende author 12/24/2012

// Calcula se os valores estão corretos

{

var ctrlDinheiro = Runner.getControl(pageid, 'Dinheiro');
var ctrlCartao = Runner.getControl(pageid, 'Cartao');
var ctrlTotal = Runner.getControl(pageid, 'Total');

var ctrlValidador = Runner.getControl(pageid, 'Validador');
function func() {

ctrlValidador.setValue(Number(ctrlDinheiro.getValue()) + Number(ctrlCartao.getValue()) - Number(ctrlTotal.getValue()));
};
ctrlDinheiro.on('keyup', func);
ctrlCartao.on('keyup', func);

}
// Calcula valor Parcela
{

var ctrlPrice = Runner.getControl(pageid, 'vezes');

var ctrlvendido= Runner.getControl(pageid, 'precovendido');
var ctrlparcela = Runner.getControl(pageid, 'valorparcela');

var ctrlDinheiro = Runner.getControl(pageid, 'Dinheiro');
function func() {
if ( ctrlPrice.getValue()!='' && ctrlvendido.getValue() && !isNaN(ctrlvendido.getValue()) && !isNaN(ctrlPrice.getValue()) )
ctrlparcela.setValue(parseFloat(ctrlvendido.getValue()) / parseFloat(ctrlPrice.getValue()) );
else
ctrlparcela.setValue('');
};
ctrlDinheiro.on('click', func);

ctrlPrice.on('onclick', func);

ctrlvendido.on('onclick', func);
}

C
cgphp 12/24/2012

Are you using the code above in two different Javascript onload events?

J
joiresende author 12/24/2012

yes

C
cgphp 12/24/2012

Where is the ctrlQuantity variable defined?

J
joiresende author 12/24/2012

There is a variable ctrlQuantity, had forgotten to delete, as I said the application works fine in mozila Firefox and other browsers do not work.

below the correct code.
// Calcula se os valores estão corretos

{

var ctrlDinheiro = Runner.getControl(pageid, 'Dinheiro');
var ctrlCartao = Runner.getControl(pageid, 'Cartao');
var ctrlTotal = Runner.getControl(pageid, 'Total');

var ctrlValidador = Runner.getControl(pageid, 'Validador');
function func() {

ctrlValidador.setValue(Number(ctrlDinheiro.getValue()) + Number(ctrlCartao.getValue()) - Number(ctrlTotal.getValue()));
};
ctrlDinheiro.on('keyup', func);
ctrlCartao.on('keyup', func);

}
// Calcula valor Parcela
{

var ctrlPrice = Runner.getControl(pageid, 'vezes');

var ctrlvendido= Runner.getControl(pageid, 'precovendido');
var ctrlparcela = Runner.getControl(pageid, 'valorparcela');

var ctrlDinheiro = Runner.getControl(pageid, 'Dinheiro');
function func() {
if ( ctrlPrice.getValue()!='' && ctrlvendido.getValue() && !isNaN(ctrlvendido.getValue()) && !isNaN(ctrlPrice.getValue()) )
ctrlparcela.setValue(parseFloat(ctrlvendido.getValue()) / parseFloat(ctrlPrice.getValue()) );
else
ctrlparcela.setValue('');
};
ctrlDinheiro.on('click', func);

ctrlPrice.on('onclick', func);

ctrlvendido.on('onclick', func);
}

C
cgphp 12/24/2012

Enable Chrome developer tools and check what errors you get.

J
joiresende author 12/24/2012

In firefox there is no error using firebug

C
cgphp 12/24/2012

Sorry, I have fixed my previous message. Check if you get errors in Chrome developers tools.

J
joiresende author 12/24/2012

Presents no mistake, it would somehow alert the user to use only the mozila firefox?

C
cgphp 12/24/2012

Post a demo link to your app.

J
joiresende author 12/24/2012
C
cgphp 12/24/2012

It says "Login invalido".

J
joiresende author 12/24/2012

Please check now

C
cgphp 12/24/2012

Same problem again.

J
joiresende author 12/24/2012

Please check now

J
joiresende author 12/26/2012

good morning
I noticed that when I use two applications at the same time, add calculations in real time only one works on the same page add.
This is only work in both Mozilla Firefox not working on any browser.
Any idea?

J
joiresende author 12/28/2012

any ideas?

Sergey Kornilov admin 12/28/2012

If you need help from support team post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.
Make sure you added English language to your project before doing that.