• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Third option to allow text box to be fully editable.

Explorer ,
Mar 28, 2022 Mar 28, 2022

Copy link to clipboard

Copied

I would like to apologize in advance if this question has been asked before. I believe that my wording isn't the best for this issue.

So I have a dropdown with some choices. All of those choices have a calcuation one way or another. Only 2 options for the calculation. 

 

if (this.getField("insuranceDD").value == 0) {
    event.value = ((this.getField("projectCostFull").value * .65) - this.getField("splitDed").value).toFixed(2);
} else {
    event.value = ((this.getField("projectCostFull").value * .50) - this.getField("splitDed").value).toFixed(2);
}


I would like to know is if there is a way that I can add a 3rd option that would allow the text box that this javascript is in to be fully editable. I know I will have to add an else if to allow a 3rd option and I thought using:

else {
   event.value = ""
}

but that just locks up the text box not allowing it to be editable. Also, the formatting for the text box is for currency if that matters. 

I appreciate any/all help and thank you in advance! 

 

 

TOPICS
JavaScript

Views

240

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

Community Expert , Mar 28, 2022 Mar 28, 2022

Sure. Just don't set event.value ...

Votes

Translate

Translate
Community Expert ,
Mar 28, 2022 Mar 28, 2022

Copy link to clipboard

Copied

Sure. Just don't set event.value ...

Votes

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 ,
Mar 29, 2022 Mar 29, 2022

Copy link to clipboard

Copied

Dang it! I was close! As always, thank you for you help @try67 it is always appreciated! 

Votes

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 ,
Mar 29, 2022 Mar 29, 2022

Copy link to clipboard

Copied

I'm sorry @try67, one more question. What would I put in place of event.value? 

Votes

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
Community Expert ,
Mar 29, 2022 Mar 29, 2022

Copy link to clipboard

Copied

LATEST

Nothing... Just drop the last else clause entirely.

Votes

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