Jump to content

[SOLVED] form not recognising input upon submit


Recommended Posts

Hey,

So I've written this code which successfully populates a form but when 'Calculate' is clicked it says that the loan amount & purchase price need to be entered; which of course they have been. Any idea why?

Here's the form https://online.leedsbuildingsociety.co.uk/public/mortgages/quick_enquiry.do

Here's the code:-

Local $oIE = _IECreate("https://online.leedsbuildingsociety.co.uk/public/mortgages/quick_enquiry.do")
If Not IsObj($oIE) Then Exit ConsoleWrite("Error in $oIE" & @CRLF)

Local $oIE = _IEAttach("Leeds Building Society - Borrowing Calculator")

_IELoadWait($oIE)

$oSelect = _IEGetObjByName($oIE, "termYears")
$oSelect.Value = $MtgTermYrs
$oSelect = _IEGetObjByName($oIE, "termMonths")
$oSelect.Value = $MtgTermMths

$oSelect = _IEGetObjByName($oIE, "adults17Over")
$oSelect.Value = ($NumOfApplicants + $OtherAdultOccupants)

Local $TotalDependents = ($Deps10To5 + $Deps16To11 + $Deps112To17 + $Deps20To5 + $Deps26To11 + $Deps212To17)

If $TotalDependents > 0 Then
   $oSelect = _IEGetObjByName($oIE, "childrenUnder17")
   $oSelect.Value = $TotalDependents
Else
EndIf

$Blah2 = ($MonthlyPensionIncomeOne + $MonthlyPensionCreditIncomeOne + $MonthlyInvestmentIncomeOne)
$Blah2 = $Blah2 * 12
$oSelect = _IEGetObjByName($oIE, "applicantOneGrossIncome")
$oSelect.Value = ($SalaryOne + $Blah2 + $SalaryPlusDividendsLatestYrOne)
$oSelect = _IEGetObjByName($oIE, "applicantOneCommission")
$Blah1 = (($BonusOne + $OvertimeOne + $CommissionOne) + ($MonthlyMaintenanceIncomeOne * 12))
$oSelect.Value = $Blah1
$oSelect = _IEGetObjByName($oIE, "applicantOneOvertimeOrBonus")
$oSelect.Value = ($MonthlyUniversalTaxCreditIncomeOne * 12)

$Blah2 = ($MonthlyPensionIncomeTwo + $MonthlyPensionCreditIncomeTwo + $MonthlyInvestmentIncomeTwo)
$Blah2 = $Blah2 * 12
$oSelect = _IEGetObjByName($oIE, "applicantTwoGrossIncome")
$oSelect.Value = ($SalaryTwo + $Blah2 + $SalaryPlusDividendsLatestYrTwo)
$oSelect = _IEGetObjByName($oIE, "applicantTwoCommission")
$Blah1 = (($BonusTwo + $OvertimeTwo + $CommissionTwo) + ($MonthlyMaintenanceIncomeTwo * 12))
$oSelect.Value = $Blah1
$oSelect = _IEGetObjByName($oIE, "applicantTwoOvertimeOrBonus")
$oSelect.Value = ($MonthlyUniversalTaxCreditIncomeTwo * 12)

$oSelect = _IEGetObjByName($oIE, "applicantOneLastYearProfit")
$oSelect.Value = ($NetPreTaxProfitLatestYrOne + $ShareOfNetPreTaxProfitLatestYrOne)
$oSelect = _IEGetObjByName($oIE, "applicantOneYear2Profit")
$oSelect.Value = ($NetPreTaxProfitPrevYrOne + $ShareOfNetPreTaxProfitPrevYrOne)

$oSelect = _IEGetObjByName($oIE, "applicantTwoLastYearProfit")
$oSelect.Value = ($NetPreTaxProfitLatestYrTwo + $ShareOfNetPreTaxProfitLatestYrTwo)
$oSelect = _IEGetObjByName($oIE, "applicantTwoYear2Profit")
$oSelect.Value = ($NetPreTaxProfitPrevYrTwo + $ShareOfNetPreTaxProfitPrevYrTwo)

$PropertyValue = _IEGetObjByName($oIE, "purchasePriceValuation")
$PropertyValue.Value = $PP

$MortgageRequired = _IEGetObjByName($oIE, "repaymentAmount")
$MortgageRequired.Value = $MtgAmt

$oSelect = _IEGetObjByName($oIE, "interestOnlyAmount")
$oSelect.Value = 0

$Button = _IEGetObjByName($oIE, "calculateBtn.value")
_IEAction($Button, "click")

_IELoadWait($oIE)

Exit

Obviously I've got values stored in all the variables so I haven't posted all that code.

Edited by Dent
solved
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...