Click an ID button

in Ideas and script requests
Subscribe to Click an ID button 4 posts, 3 voices



burmakite User
FirefoxMacintosh

Is is possible to send a mouse click to any button that has an ID="fire" for example?
If so, what's the code?

 
w35l3y Scriptwright
FirefoxWindows

button?

document.evaluate("id('fire')", document, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue.click();
it doesn't work if the element is a link

 
burmakite User
FirefoxMacintosh

what if I only want to send the clicks at specific times and I don't want it to be persistent?

 
JoeSimmons Scriptwright
FirefoxWindows

Then you use listeners and timeouts.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel