Debugger Console requesting phantom ; HELP!!!

Explorer ,
Feb 21, 2021 Feb 21, 2021

Copy link to clipboard

Copied

error message is listed below and line 241 is the ending "else" statement- I have been through the entire code and found only 1 missing ; in my varibles, which I corrected. I have used Notepad Text editor and looked at all my syntax- I cannot find this error!!!!!! Help!!!!!!   and I also assume since it's not being used in my form that contains the variables since I'm checking for syntax errors in the console that the "Undefined" message means that it can't define some variables?

 

else if ((TTT === "DUPTRT") && (VEHTYPE === "VS") && (cbLien !== "Off") && (cbPTIT !== "Off")) {event.value = 14.75;}
else if ((TTT === "DUPTRT") && (VEHTYPE === "VS") && (cbLien !== "Off") && (cbFTIT !== "Off")) {event.value = 17.25;}

else if ((TTT === "DUPLOST") && (VEHTYPE === "VS") && (cbFTIT !== "Off")) {event.value = 5.00;}
else ((TTT === "DUPLOST") && (VEHTYPE === "VS") && (cbFTIT === "Off")) {event.value = 0.00;}

SyntaxError: missing ; before statement
241:Console:Exec
undefined

TOPICS
JavaScript

Views

47

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Adobe Community Professional , Feb 21, 2021 Feb 21, 2021
Use 'else if' on the last line not just 'else' Also in the first line if that is start of your code don't use 'else if' use just 'if'.

Likes

translate

Translate

Translate
Adobe Community Professional ,
Feb 21, 2021 Feb 21, 2021

Copy link to clipboard

Copied

Use 'else if' on the last line not just 'else'

 

Also in the first line if that is start of your code don't use 'else if' use just 'if'.

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 21, 2021 Feb 21, 2021

Copy link to clipboard

Copied

that worked Nesa, but I thought you always had to end with an "else"? Is it ok to end with "else if"?

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Most Valuable Participant ,
Feb 21, 2021 Feb 21, 2021

Copy link to clipboard

Copied

Yes, it is. That just means that if none of the conditions are met then no action takes place.

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 21, 2021 Feb 21, 2021

Copy link to clipboard

Copied

Awesome Nesa! Thanks!!!

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines