+ 3

SOLVED Why isn't this button working?

The alert function goes straight to the wrong function automatically, please help someone https://code.sololearn.com/Wbut77Wgm2W0/?ref=app

20th Mar 2022, 2:02 AM
Ishak
Ishak - avatar
17 Answers
+ 7
Alison quinn here is your code modified to use a flag. It is just a quick change and you can refactor it to toggle the flag and limit the flags scope. https://code.sololearn.com/WQafVNtS8kIA/?ref=app Ipang
20th Mar 2022, 3:01 PM
Paul K Sadler
Paul K Sadler - avatar
+ 4
A button doesn't have clicked() method or property according to MDN https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button What are you trying to do anyways?
20th Mar 2022, 2:51 AM
Ipang
+ 4
P.S. if rather than deleting your questions, if you leave them they can be helpful to others with similar question(s)
20th Mar 2022, 3:02 PM
Paul K Sadler
Paul K Sadler - avatar
+ 3
Ipang I'm trying to make it so that if the button is clicked and then save is clicked, it will alert "button was clicked" but if the button wasn't clicked and save was clicked then "alert button was not clicked".
20th Mar 2022, 2:13 PM
Ishak
Ishak - avatar
+ 3
Yes, now I remember. Alison posted a question about that code earlier this week, and the post was deleted. I was gonna try to solve it but then I see the post had gone : D
20th Mar 2022, 3:07 PM
Ipang
+ 3
Alison quinn Your not dumb, and glad to help as I know Ipang is.
20th Mar 2022, 3:11 PM
Paul K Sadler
Paul K Sadler - avatar
+ 3
Alison quinn that let's you flag an answer as best. It helps those that review the thread focus on the answer that you felt best answered the question. Sometimes there are a number of best answers and then some choose not to set one as best answer.
20th Mar 2022, 3:13 PM
Paul K Sadler
Paul K Sadler - avatar
+ 2
Paul K Sadler thanks, sorry for deleting it ๐Ÿ˜… Ipang oh damn seriously, I'm so dumb, I should have kept it there, thanks for the help guys :')
20th Mar 2022, 3:10 PM
Ishak
Ishak - avatar
+ 2
One last question, what does that tick button do? The one beneath the down vote button
20th Mar 2022, 3:11 PM
Ishak
Ishak - avatar
+ 2
Try to fix the code..
20th Mar 2022, 3:45 PM
Hrithika
Hrithika - avatar
+ 1
If you want something to happen when the red button, that's not red, is clicked then you need an onclick like you have on the save button.
20th Mar 2022, 4:16 AM
Paul K Sadler
Paul K Sadler - avatar
+ 1
Paul K Sadler ive already tried adding another onclick function but It didn't work
20th Mar 2022, 2:15 PM
Ishak
Ishak - avatar
+ 1
Can you post that code and describe what you expect to happen when the button is clicked(if it'sdifferent than above)? Then we can comment on what we think the issue is with you not getting the desired result.
20th Mar 2022, 2:20 PM
Paul K Sadler
Paul K Sadler - avatar
+ 1
Paul K Sadler Here's the original code, I had to give a shorter question since people tend to help when the code is only a few lines long I just want to alert the user if a button has not been clicked, https://code.sololearn.com/W8f9JY2LexMd/?ref=app
20th Mar 2022, 2:28 PM
Ishak
Ishak - avatar
+ 1
Oh ... i have a friend called KARTHIK try to reach him on sololearn . Im sure he can help
20th Mar 2022, 3:51 PM
Hrithika
Hrithika - avatar
+ 1
ํ•œ๊ตญ ์†Œ๋…€ It's ok, the issue has been sorted but thank you!
20th Mar 2022, 5:00 PM
Ishak
Ishak - avatar
0
์—๋‰ดใ…“๋ฌด I have tried :) the problem is solved
20th Mar 2022, 3:47 PM
Ishak
Ishak - avatar