Create dialog box after receiving a security message
-
mercoledì 3 agosto 2011 12:28
Hi
I just wondering, is it possible for me to create a dialog box (with some buttons in there) to be pop up after user receiving security message/warning. For example user would like to download application from this one website. then he/she click the link and security warning/message will be pop up to ask action for him/her to take (save, run cancel etc). after user make a decision, I would like to pop up another dialog box to ask users with some other questions. Can it be done?
I try to find information on hooking and subclass within this forum and unable to find one that suit the best with the problem that I facing now. It would be great if anyone can advise me on this issues.
I hope to hearing from anyone of you soon.
Thank you.
zafi
Tutte le risposte
-
martedì 9 agosto 2011 03:40Moderatore
Hi Zafi,
Welcome to the MSDN Forum.
We are looking at this issue and probably will take a while to do research.
Thank you for your understanding and support.
Best regards,
Mike Feng [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

-
martedì 9 agosto 2011 09:00
Hi Mike,
Thanks so much for your effort and time. I am more than happy to learn from you and others.
zafi -
mercoledì 10 agosto 2011 02:05
Hi Zafi,
Per my understanding, you are developing a web application which interactive with users with pop up dialog.
If so, usually we use the event and script functions to interactive with end users. Take the sample as you mentioned.
When click the link , implement the onclick http://msdn.microsoft.com/en-us/library/ms536913(v=vs.85).aspx event to pop up security message/warning
Then use showModalDialog http://msdn.microsoft.com/en-us/library/ms536759(v=vs.85).aspx to display dialog after user make a decision.
Any feedbacks or discussions are always welcomed.
Tracy Yu [MSFT]
MSDN Online Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
-
mercoledì 10 agosto 2011 09:58
Hi Tracy,
I am not sure if I have misunderstood you in some way. or I am the one who did not understand you explanation. Please correct me if I am wrong.
Actually the scenario like this :
User receive a security message/warning when clicking the link to download the application. In the security message/warning have 3 buttons as options for user. after they click the button from the security message/warning, I would like to propose a custom dialog box will be pop up.
(the one that you mentioned in aforementioned posting, referring to the click link event)
1. I'm not sure how to hook the users action in the security message/warning.
2. I have came across with the term call system wide hook. But im not sure about it.
3. if using system wide hook, my understanding it will be able to hook any type of security message whether from web browser or from OS or application? I think... but im not sure.
I hope you can advise me on this matter. I really appreciate the effort for you and others to help.
Thank you so much
zafi -
sabato 13 agosto 2011 11:32
hi Zafi,
Thank you for your clarification.
I am not sure your method to pop up the security message. However if you use the mentioned showModalDialog, just use normal script block to handle the user action child page(child.html) cand use window.returnValue to hook user action in parent page.(parent.html)
Parent html --------------------------------- <html> <script language="javascript" type="text/javascript"> function opendialog() { var a = window.showModalDialog("child.htm","","dialogWidth=300px;dialogHeight=200px;status=no;help=no;scroll=no") alert(a) } </script> <title>test</title> </head> <body> <button onclick="opendialog();">open the dialog</button> </body> </html> child html ------------------------------------ <html> <script> function sendTo() { window.returnValue = "hello" window.close() } </script> <body> <form> <input value="return to parent page" type=button onclick="sendTo()"> </form> </body> <html>
About the system side hook, yeah, i think it will detect all the security message from system level.
best wishes
Tracy
-
martedì 16 agosto 2011 11:12
Hi tracy,
It seem you proposed to use the java script. But im not so sure where to implement this in the current web browser. (e.g. Internet Explorer/Mozilla Firefox)?
Do you mean to embedded this in the current implementation of browsers or create it from scratch. I am sorry asking you a bit further as I would like to learn from the expert. Please do not hesitate to advise me.
I have another concern on this issues as well. Do you think any conflicts will be raised by the Operating system/Antivirus ? Any issues on security and privacy?
It make me wondering ....
Hope to hearing from you soon.
zafi -
sabato 20 agosto 2011 15:05
hi zafi,
what do you mean by "implementing this in the current web browser"? I suppose you are developing a website and write the webpages to interactive with end users. did i misunderstood anything?
wishes
Tracy
Tracy YU[MSFT] MSDN Community Support | Feedback to us Get or Request Code Sample from Microsoft Please remember to mark the replies as answers if they help and unmark them if they provide no help. -
martedì 23 agosto 2011 13:07
Hi Tracy,
I might misunderstood you :( I am sorry for that. Currently try to create a separate program to hook security message from web browser or Os. Having difficulty using Vb I am using c++ now. It partially working with some problem that I face. I am not creating a website to embedded the codes as you propose. I think there will be an issue later on. Even though im using a separate program to hook security message it will be conducted in a closed environment for research purpose. Do you mind If i get your e-mail address so that I can show you the codes and how it works.(Due to codes are too long). Later on I can share some thoughts to help other users who might face the same issues.
I have been struggling to do this and might need expert opinions.
Hope to hearing from you soon.
Thank you
zafi -
domenica 28 agosto 2011 11:00
Hi zafi,
Thank you for your update.
Please note the implementation varies if you switched to C++. And i suggest you post another new thread in C++ forum to find the best resource for your question. And if possible, i'd keep an eye on your new post and provide as much help as i can.
Tracy YU[MSFT]
MSDN Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
-
mercoledì 12 ottobre 2011 09:30
Hi Tracy,
I am so sorry for my very late reply. I really appreciate your help. I will post it in c# posting later on. My mistakes to tell you that it is in c++. It suppose to be c#. I hope anyone can help and guide me .
Again thank you
zafi

