0

I want to click on a button in a popup using javascript. When i search it with internet it only shows how to minimize. Is anyone know how to do it?

Thanks in dvance.

4
  • 1
    What have you so far tried? Commented Mar 3, 2014 at 7:05
  • I have tried with onkeydown option but the problem is initially the mouse option is in cancel button so when i use this onkeydown the process stopped. Hope u understand Commented Mar 3, 2014 at 7:08
  • which button you want to press? Commented Mar 3, 2014 at 7:09
  • There are two button in that windows popup. 1. Run 2. cancel. I want to click on Run. Commented Mar 3, 2014 at 7:10

2 Answers 2

1

As the Pop up window is added dynamically you can use a delegate for that

$('body').on('click',"#buttonid", function(){
//write code here
})
Sign up to request clarification or add additional context in comments.

2 Comments

i want to click on a windows popup button. Will it work?
As per your latest description, it is not web popup it is window popup alert while opening a file, i dont think it will work like that
1

No you can not click on a Windows dialog button via pure Javascript.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.