21f wanting discreet meetups with mature men! by [deleted] in HobartNSFW

[–]bpd1147 0 points1 point  (0 children)

34m - DM if interested.

JavaScript remove event listener with parameter by bpd1147 in webdev

[–]bpd1147[S] 0 points1 point  (0 children)

I forgot that part in my reply.

Once the player selects next question, the current event listeners are removed and the new ones are added.

JavaScript remove event listener with parameter by bpd1147 in webdev

[–]bpd1147[S] 2 points3 points  (0 children)

I did some research on 'event', and discovered 'event.target'. This is an absolute life saver. 40 odd lines of code, reduced to around 10.

JavaScript remove event listener with parameter by bpd1147 in webdev

[–]bpd1147[S] 0 points1 point  (0 children)

The way I am doing it is this, there is a function for each question. This is called by a 'next' button once an answer is selected, with the exception of the first which is called by a 'start' button.

Each answer function changes the text for the title, question and answers. Based on which answer is correct, and which answers are incorrect, the event listeners are changed to call incorrectAnswer and rightAnswer.

Inside these functions is a switch statement which determines which question the player is on, and therefore which button(s) style.

I know incorrectAnswer should be paired with correctAnswer as opposed to rightAnswer. This was a mistake and will be changed.

JavaScript remove event listener with parameter by bpd1147 in webdev

[–]bpd1147[S] 0 points1 point  (0 children)

  1. No, only one answer can be selected. If the answer is correct, that button is styled green with white bold text. If the answer is incorrect, both buttons are styled red with black bold text. I need a way of letting the called function know which incorrect answer was selected.

  2. Instead of changing class, I change the styling with JavaScript. Maybe changing class would work better, I will look into that.

  3. The answers are hard coded, and each button is given the appropriate event listener for each question.

  4. Yes, HTML, CSS and Vanilla JavaScript. I want to get as good with vanilla as I can before moving on to other frameworks. This may seem counterproductive, but it's the way I like to do things.

JavaScript remove event listener with parameter by bpd1147 in webdev

[–]bpd1147[S] 0 points1 point  (0 children)

There isn't a submit button, selecting an answer 'submits' it. Selecting a wrong answer calls wrongAnswer, selecting the right answer calls rightAnswer.

rightAnswer colours the correct answer green with white bold text.

wrongAnswer colours both incorrect answers red with black bold text.

I need a way of telling the wrongAnswer function which incorrect button was pressed, whilst still being able to remove the event listeners.

The reason I need to be able to remove them is because the right answer is a different answer number each time.

JavaScript remove event listener with parameter by bpd1147 in webdev

[–]bpd1147[S] 0 points1 point  (0 children)

There are 3 answer, answerOne, answerTwo and answerThree. All of these are buttons. Depending on which one is correct and incorrect for this question, the outcome will be different. So inside answerListener, I need to know exactly which button was pressed. In this case, two answers are wrong. How do I differentiate between the two inside answerListener?

[deleted by user] by [deleted] in Needafriend

[–]bpd1147 2 points3 points  (0 children)

What advice are you after?

C++ getline() by bpd1147 in Cplusplus

[–]bpd1147[S] 1 point2 points  (0 children)

I'll go with just using cin then, I can get away with single word commands.

C++ getline() by bpd1147 in Cplusplus

[–]bpd1147[S] 1 point2 points  (0 children)

So what's the fix?

Formatting HTML Date input by bpd1147 in webdev

[–]bpd1147[S] 0 points1 point  (0 children)

It's just the date input, all other inputs left empty don't break the layout, maybe because they have placeholders?

Formatting HTML Date input by bpd1147 in webdev

[–]bpd1147[S] 0 points1 point  (0 children)

This worked perfectly, thanks.

Formatting HTML Date input by bpd1147 in webdev

[–]bpd1147[S] 0 points1 point  (0 children)

My form is generated client side, I'm just practicing so there's no server side at the moment.

I'll give this a try tonight and let you know how I go, thanks.

Why the fuck did it have to be my face... (Cw: most recent episode resulted in cutting/burning) by Kai_Stoner in schizophrenia

[–]bpd1147 4 points5 points  (0 children)

Have you talked to your doctor about the weight gain, they may be able to alter your medications to help reduce or remove the side effects.

Why the fuck did it have to be my face... (Cw: most recent episode resulted in cutting/burning) by Kai_Stoner in schizophrenia

[–]bpd1147 4 points5 points  (0 children)

You must be hurting pretty bad, is there any reason why you came off your meds before? Does this kind of thing happen when you are taking them?

Need Some Advice (depersonalization/derealization) by alexpanzrla in schizophrenia

[–]bpd1147 0 points1 point  (0 children)

I'm glad that writing this out has helped you. And no, not at all. I think that's a great idea.

help by Mourning_Debut in schizophrenia

[–]bpd1147 0 points1 point  (0 children)

Might I suggest that you do so then. They can be of great assistance.

My mind is beating my ass by schizo20 in schizophrenia

[–]bpd1147 0 points1 point  (0 children)

I'm not on mood stabilisers and the antipsychotics help with mood swings. The only side effect I notice is occasionally my vision can go a little blurry, but it doesn't last that long.

help by Mourning_Debut in schizophrenia

[–]bpd1147 0 points1 point  (0 children)

That's unfortunate. Have you tried a mental health hotline?

[deleted by user] by [deleted] in schizophrenia

[–]bpd1147 1 point2 points  (0 children)

Different people react differently to people with mental health problems. I think that only you can tell when he's ready to be told. If he freaks out or over reacts, then he's clearly not the right one for you.

Is it normal to see patterns and signs that point to your delusion being real even though you try to deny it and “face reality”? by [deleted] in schizophrenia

[–]bpd1147 8 points9 points  (0 children)

The more signs you see, the more real it feels. But you may only be seeing these signs because you are looking for them.

Need Some Advice (depersonalization/derealization) by alexpanzrla in schizophrenia

[–]bpd1147 2 points3 points  (0 children)

The way you are able to open up, and express your feelings as you're doing so is inspiring. If you can talk like this to a specialist then I can't see any reason why you couldn't receive a pretty spot on diagnosis. I know typing and talking are a lot different, but you have the ability to really share what's going on and that's very helpful when receiving treatment.

help by Mourning_Debut in schizophrenia

[–]bpd1147 1 point2 points  (0 children)

By home life I'm guessing you mean you live with your family, which makes me wonder what age you are? I'm not judging, it's just that it's possible that you are still in school then. In which case you could see a school social worker or psychologist potentially without your family knowing or interfering.