How to Display POP-UP Box [ Message Box] when we click on Button

Kishore8
Kilo Guru

Hi,

if i clicked   YES or NO button in KB ARTICLE     then immediately       display POP-UP box(message box) with message- Thanks for Visiting

OR    

Make Comments box mandatory .

for this i tried to check UI Macro's(it is in readonly)   , UI pages   but   i am unable to understand where need to do changes

find_real_file.png

1 ACCEPTED SOLUTION

Hi Kishore,



yes this should be possible.


just as on click of yes you added an alert same can be done for No as well.


you need to add if else condition in the script.


I have tested and it is working fine.



Modify the code as per below screenshot.



ui macro knowledge.JPG



Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.


Thanks


Ankur


Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

11 REPLIES 11

I am really thankful to you Ankur!...



Could you please help me on this


Please update anything either it is possible or Not.


Hi Kishore,



I don't think it will be a easy task to handle this since it is the HTML text box and not normal variable/field.



Regards


Ankur


Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi ankur,




thanks for that, i would like to know one thing here one



i would like to see, when i click on YES- then display     " Thanks for Visiting"


                                                                                                            NO - then display       " Please provide your feedback"         can we able to change the display message like this.


Hi Kishore,



yes this should be possible.


just as on click of yes you added an alert same can be done for No as well.


you need to add if else condition in the script.


I have tested and it is working fine.



Modify the code as per below screenshot.



ui macro knowledge.JPG



Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.


Thanks


Ankur


Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur,



It is working fine!



Thank you so much Ankur!


really i am very thankful to you Ankur!.



it is very help for me, and very helpful to   others.