I have a form where a user enters their address. This then checks their address against several destinations in the UK to see which city is their nearest. I want each destination to have different prices, for example London, UK = 50, Birmingham, UK = 200 etc. I have written a pretty rudimentary if statement which checks the city that
Tag: if-statement
which one is bigger?! a problem in my js code
I write a js code to determine which number is bigger but the result is not perfect! when I input two number with same digit numbers, the result is correct. For example when I input “2” and “3” the result is “3” but when I input “2” in first field and “55” in the second field, the result is “2”.
Why is this ‘else if’ function not working with onEdit on Google Appscript?
I want to make it so whenever a cell in column 9 is edited, if the new cell value is different from “Ok”, the range “newRange” gets it value set to “Yes”; and if the new cell value is equal to “Ok”, “newRange” gets its content cleared. Here’s my attempt: The first part works great, but the content in “newRange”
Leap year Question in Javascript using nested if-else
In the nested if statement, I have given all the conditions. But some leap years are not being shown as Leap year. For eg: 2000 is coming as a leap year, but year like 2016, 2020 aren’t being considered as a leap year. Please Help. Answer If the year is divisible by 100, you need to check if the year
How to specify the 5 apex items on my javascript code at oracle apex
Please see picture on the link. How do I code 5 apex page items in a javascript using if else condition. Initially, what I am doing is i am trying to hide regions which will have empty page items and that depends on the sql query results. please help. thank you. Here is my code: Answer I was able to
Qualtrics show question based on previous answer using JavaScript
I’m fairly new to JavaScript and have tried to find a solution to my problem but without success. I have a question (Q4) that should only be displayed if the answer to Q3 is “yes”. If I use display logic, Qualtrics will put Q4 on a separate page since it is a “slide” question (the In Page option is unavailable).
Want to remove previously appended table
When I Click on submit button after clicking on the links it appends perfectly but when I hit the button again it doesn’t remove previously appended table. I want to clear the previously created table when user clicks on the cross button and then print the table again or else overwrite the table but instead it is not removing the
beginner javascript button
I’m really struggling with a basic javascript problem and I can’t find the right way to Google help. I’ve been practicing Javascript, but thus far I’ve mainly been just following prompts, not coding my own ideas. I genuinely tried to solve this problem on my own for several hours. This is my very first attempt at generating my own javaScript
How to split nested ternary operator into normal if else condition
I was trying to understand ternary operator into normal if else condition. how to understand this multiple nested condition Answer It’s equivalent to the following: The conditional operator approach could be refactored to be more readable by putting the NOTHING condition first, though, if you wanted:
different vars and ifs for different videos not working
I’m trying to create the function that if a key is pressed, a video appears. I have managed to do it for one key and it works fine: But i want to do this for several different keys, (26 to be exact). I figured that what I needed to do was copy the same code and place it below, like