I’m trying to figure out this weird issue I’ve been having, and the root cause is the difference between a live click and triggering .click().
I won’t get into the details of the problem, but basically when you click on the input button it works fine (has an onclick event). But if I call .click() from somewhere else (instead of physically clicking the button) it doesn’t work properly.
My question is – is there a way to truly replicate an actual click on a button?
EDIT
The problem: I’m opening a new window (aspx page) that loads an inline PDF. If I actually click on the link, the window opens fine and the PDF loads. If I use .click() the window opens and I’m prompted to download the PDF file. I’ve been through Adobe Reader settings, browser settings, and registry settings about the prompting – I understand that these can be factors to the big picture, but right now I’m concerned about why the behavior between a mouse click and .click() are doing anything different at all.
I use this function to truly mimic a mouse click: