I am filling a form automatically with a bookmarklet, with lines of code like
document.getElementById('id_but1').value = " a"
The code works in the browser console, but not as a bookmarklet.
From reading this SO answer I suspect the problem is caused by iframes.
https://stackoverflow.com/questions/51723626/bookmarklets-doesnt-work-when-run-from-bookmark-but-works-from-console
SO suggests a piece of code like
let Iframe = document.getElementById('iframe_id').contentWindow.document
let value = Iframe.getElementById("textboxID").value = "Some Text"
The problem in my case is that I don't know the id for the iframe,
i.e., I don't know 'iframe_id'.
Any suggestion for knowing the ids of the iframes?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 251 |
Nodes: | 16 (2 / 14) |
Uptime: | 21:41:06 |
Calls: | 5,542 |
Calls today: | 1 |
Files: | 11,676 |
Messages: | 5,108,656 |