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

Dropdown item price with java script

New Here ,
Nov 18, 2022 Nov 18, 2022

Copy link to clipboard

Copied

my issue is that , i have 1 dropdown name Items with 3 items (fruits) i want when someone pick any friut in dropdown the price auto come in price section, i do this java script in price section it's not showing any error but not showing the price too , i have tried many times but stuck in this problem pls guide me where im doing mistake 

 

var Item = this.getfeild("Items").value;
switch(Item) {

 

case "Apple":
event.value = "100";
break;

case "Banana":
event.value = "150";
break;

case "Graps":
event.value = "200";
break;

case "Orange":
event.value = "250";
break;

}

TOPICS
Crash or freeze , JavaScript , PDF forms

Views

1.6K

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 ,
Nov 18, 2022 Nov 18, 2022

Copy link to clipboard

Copied

There are errors in your code. Check the JS Console.

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
New Here ,
Nov 19, 2022 Nov 19, 2022

Copy link to clipboard

Copied

brother what is JS Console kindly tell me the error in easy way

 

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 ,
Nov 19, 2022 Nov 19, 2022

Copy link to clipboard

Copied

This is wrong: "getfeild"

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 ,
Nov 19, 2022 Nov 19, 2022

Copy link to clipboard

Copied

"brother what is JS Console?"

 

Capture_2211191109.png

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
New Here ,
Nov 19, 2022 Nov 19, 2022

Copy link to clipboard

Copied

Thanks i open these options , brother i still cant fix issue , i dont know the java script please correct my script where is problem 

 

var Item = this.getfeild("Items").value;
switch(Item) {

 

case "Apple":
event.value = "100";
break;

case "Banana":
event.value = "150";
break;

case "Graps":
event.value = "200";
break;

case "Orange":
event.value = "250";
break;

}

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 ,
Nov 20, 2022 Nov 20, 2022

Copy link to clipboard

Copied

Change getfeild to getField like this:

var Item = this.getField("Items").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
New Here ,
Nov 20, 2022 Nov 20, 2022

Copy link to clipboard

Copied

LATEST

Thank you so much 

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