Popup | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Popup

Hi guys! Do you know how to open second popup with button from first popup. I mean like this: When I click on the icon it's open popup and inside that popup I have one button. Now I want to open second popup with klick on that button.

27th Oct 2020, 3:40 PM
Alvedin
Alvedin - avatar
12 Answers
+ 4
Sabit_iz_Tarcina if you would put a link to your code here, then we could see, what you are trying and how exactly can be helped you, as already above mentioned. Otherwise someone from here would have to be a psychic to see it, what in your code causes this error.
27th Oct 2020, 8:21 PM
JaScript
JaScript - avatar
+ 2
Sabit_iz_Tarcina can you put a link to your code here ,so I and others can see what you are trying and how exactly we can help you !
27th Oct 2020, 4:14 PM
Abhay
Abhay - avatar
+ 2
Sabit_iz_Tarcina Ok assuming you have that second popup, set it's display to none ,just attach a onclick event handler to the button in the first popup and set it's display to block ,
27th Oct 2020, 4:22 PM
Abhay
Abhay - avatar
+ 1
Sabit_iz_Tarcina you talk about my code? Ok, I‘d like to provide you a short description: 1. Run of the code opening the first popup. First popup has a close button „x“. 2. If you click this close button (as in the first popup is written) will be opened the second popup. That I have so made for joke to this situation. 3. The button is for opening of the first popup only, so that the application does not have to be started again. Have fun with coding.
27th Oct 2020, 6:27 PM
JaScript
JaScript - avatar
+ 1
Sabit_iz_Tarcina I think so. I've left some work for you. If you like to learn you could analyze the code and adapt it for your use in no time.
27th Oct 2020, 6:41 PM
JaScript
JaScript - avatar
0
Looks possible to me,anything you have tried?
27th Oct 2020, 4:06 PM
Abhay
Abhay - avatar
0
Yes, I created the first popup and I have button inside that popup. Now I trying to fix that open second popup when I click on that button which is placed in first popup. Maybe with id I can do it. What do you think Abhay ?
27th Oct 2020, 4:10 PM
Alvedin
Alvedin - avatar
0
It is not on sololeran. It is in other program on laptop.
27th Oct 2020, 4:16 PM
Alvedin
Alvedin - avatar
0
Maybe it open, but the button need to be in first popup and when you click on that button in first popup it opens second popup. As I can se your button is not inside popup.
27th Oct 2020, 5:30 PM
Alvedin
Alvedin - avatar
0
Yeah, but thing is that I need to open first popup onclick and then onclick on button in first popup open second popup. I don't need to go to other page or like refresh etc... Your code doesn't work for me on that way I want. Sorry but I 'm only trying to solve my issue :)
27th Oct 2020, 6:32 PM
Alvedin
Alvedin - avatar
0
Sure, I learn me every day. I didn't expect the whole code from someone here. I have code for both popups. And I can open first popup but when I click on the button which is placed in that popup it doesn't show me the second popup. So I 'm only trying to get some advice on which way is possible to do that.
27th Oct 2020, 6:49 PM
Alvedin
Alvedin - avatar
0
Did you se it?JaScript
27th Oct 2020, 8:51 PM
Alvedin
Alvedin - avatar