Skip to main content

All Questions

Tagged with
0 votes
1 answer
55 views

unable to print result from switch case in java script

I took one input om(obtained marks) and another input mm(total marks), I am trying to calculate the percentage and grade. I got the output for percentage marks but couldn't get the output for grade ...
Manasa's user avatar
  • 11
1 vote
0 answers
32 views

Add a switch statement in JS based on a HTML <select> element [duplicate]

I am learning how to integrate JavaScript into HTML documents and want to build a simple calculator app. The idea is that there will be two elements from which the app takes the arguments and a ...
szymonhimself's user avatar
0 votes
0 answers
86 views

ESPAsyncWebServer switch page after upload file to ESP8266

In my ESP8266 I am using the ESPAsyncWebServer lib. My purpose is to upload a file to ESP8266 and after uploading the website should be switched to another one. The html code is: const char ...
Andre's user avatar
  • 1
0 votes
0 answers
120 views

How I can dynamically add HTML with if /else or swtich/case conditions

What I'm trying to do : I want to create an html code generator. The idea is to be able to create an email skeleton, with the possibility for the user, via inputs, to modify certain data, such as the ...
blogob's user avatar
  • 510
2 votes
1 answer
28 views

How would I add an image to an html page using a js case/switch function?

I have this code block: switch (type) { case 'a': return 'option 1'; case 'b': return 'option 2'; case 'c': return 'option 3'; default: return ''; } I need it however needs to display a ...
Cosmonautical's user avatar
0 votes
1 answer
129 views

Prompt a user multiple times while selecting a choice

I'm having difficulty doing this: Create a new HTML file with script tags as demonstrated in the video. Prompt the user to enter a day of the week in numerical form where 1 is Sunday and 7 is ...
Oswald Martin Degiorgio's user avatar
1 vote
2 answers
767 views

How to display different texts depending on the browser language?

let language = navigator.language; switch (language) { case es : document.getElementById("demo").innerText = "Hola "; break; case en : document....
al3j4ndr0's user avatar
1 vote
1 answer
103 views

How to display images using Switch statement?

I'm working on a Mass Effect personality quiz that has been adapted from the EasyDamus D&D quiz from the 90s, and I'm having trouble with the results page. Namely, I'm trying to include an image ...
user avatar
0 votes
0 answers
16 views

Having trouble in my first time trying to use switch case [duplicate]

I have 4 buttons that when clicked are supposed to display the current time (for check in, out, lunch in, out). I'm using a Fetch API to record these times and I'm trying to use a switch case so it'll ...
maj1n's user avatar
  • 13
0 votes
0 answers
27 views

How to operate with more than 2 numbers [duplicate]

I'm trying to build a calculator with HTML, CSS and JS but I can't fix how to operate for example 1 + 2 + 3. Right now I'm getting 5 as a result with my actual code and the correct result should be 6. ...
Didi's user avatar
  • 11
0 votes
1 answer
87 views

Is there a way to display different strings based on a switch statement that are coming from an input field

In the program I am writing the user can add a part to a queue and the most recent part is displayed in a separate div. What I am trying to do is get the value of the input for displaying the part and ...
Austin Drake's user avatar
0 votes
0 answers
81 views

switch statement only runs once with mouse over listener

when i move over the star icons, The handleselect function runs only once(the initial icon i moved over) it seems like the mouseover event only runs once but it doesn't. When i console.log(event....
Quest's user avatar
  • 11
0 votes
2 answers
183 views

Shopify Liquid Switch Statement Half Working...?

Thanks to @GeorgeButter for this code. I have applied it to my application, however have run into some problems. I'm having a little issue with finding out why my case statement wont load the SVG ...
Anake.me's user avatar
  • 467
0 votes
0 answers
31 views

The funcion onclick only takes one operation

I am trying to make a simple calculator with multiple buttons, but somehow it only takes the operation '+' and the #dot doesnt work. any help or tips? var input='', acc=0, operation=''; ...
raye's user avatar
  • 1
0 votes
1 answer
153 views

Why will this switch statement only work with a single case?

Why will this switch statement not work? It will only work when I remove all but one (any) of the cases. It seems to get the values correctly and match them up to the correct case but when there is ...
domo's user avatar
  • 27

15 30 50 per page
1
2 3 4 5
16