Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Javascript Help

Status
Not open for further replies.

primagic

IS-IT--Management
Jul 24, 2008
476
GB
I am trying to set a value of a text field based on the item selected in two combo boxes.

If the value of DayInvityQty = 188 and the value of DayInviteInk = 70 then the value of the textbox = 4 and so on as seen in the code below.

The code comes up with a syntax error on the line

Code:
event.value = 6

Any help to solve the code.

Many thanks


Code:
if (this.getField("DayInviteQty").value == '188') And (this.getField("DayInviteInk").value == '70');  {
event.value = 4
} else if (this.getField("DayInviteQty").value == '204') And (this.getField("DayInviteInk").value == '70') {
event.value = 6
} else {
event.value = 0 
}

 
if (this.getField("DayInviteQty").value == '188' && this.getField("DayInviteInk").value == '70') {
event.value = 4
} else if (this.getField("DayInviteQty").value == '204' && this.getField("DayInviteInk").value == '70') {
event.value = 6
} else {
event.value = 0
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top