To change call form fields & calculate LTV values

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

To change call form fields & calculate LTV values

Postby piyush » Sat Jun 09, 2007 12:41 am

hello Sir,
I have install dialer. now i want to change some field in dialer callform.
I have change three fields Address2,address3 & provience respectively FMV, Loan Amount, LTV. I want user enter value in FMV , Loan Amount & LTV is calculate On that field I have user script to calculate LTV value when we click on LTV text field it calculate the value. but i have problem Where should i use my script in VICIDIAL.php file that LTV value calculate properly.& also check my script file it is right or not please give me feverable response.
The following scripts I have used .first is javascript & other one is php script
Java Script File.
function calcltv()
{
var c1 = window.document.getElementById("Textfield1")
var c2 = window.document.getElementById("Textfield2")
var c3 = window.document.getElementById("Textfield2")
fmv = parseInt( c2.value)
if (isNaN(n4))
{
n4=0
}
if (isNaN(n1))
{
n1=0
}
if (isNaN(n2))
{
n2=0
}
if (isNaN(n3))

{
n3=0
if (isNaN(fmv))
{
fmv=0
}
c3.value =parseInt( Textfield.textt * 100 ) / parseInt(Textfield.text)
Textfield.text=c3.value
}

Php File
fuction Calcltv()
{
$c1 = window.document.getElementById("address3");
$c2 = window.document.getElementById("address2");
$c3 = window.document.getElementById("province");
$c1.value=parseInt(address3.text);
$c2.value=parseInt(address2.text);
$c3.value = ( $c1.value * 100 ) / $c2.value;
}


Thanks
piyush
 
Posts: 25
Joined: Sat Sep 09, 2006 8:04 am

Return to Support

Who is online

Users browsing this forum: Majestic-12 [Bot] and 93 guests