NeXT5tep NeXT5tep - 1 year ago 97
Javascript Question

How do I emulate a click on a div then fire the onclick event in webview programatically?

I am new to JavaScript,just created a cocoa app with a webView embedded which display the gmail iPhone site.What i want to do here is to schedule a timer method, then in the timer method,emulate a click on a refresh button to fire the on click event?
Please help.

enter image description here

Answer Source

Dom events can be fired just calling it:

The code below will fire the click event of the element with the id '#foo'

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download