• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Validation of textfield with value or cero

Validation of textfield with value or cero 11 years 11 months ago #17576

  • rolea463
  • rolea463's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
Here ie deal:
I already work with the calculate example and I get an percentage value of a process but I need to define that if User make "0" on textfield "e1" I will run a formula, and if the user get some data on textfield "e! I will run anothe validation process, Here is the actual code:

<script type="text/javascript">
function calculateTextfinal()
{
var op1=document.getElementById('e1');
var op2=document.getElementById('total1');
var result =document.getElementById('total2');

if(op1.value>0){(op2.value/100)*(10000/81)
}
else
{
(p2.value/100)*(10000/66)}

result.value=0;
result.value=parseInt(result.value);

}
</script>

but is not working,

Im not have experience on Javascript so any help could be great
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!