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: | 546 |
Nodes: | 16 (0 / 16) |
Uptime: | 167:50:49 |
Calls: | 10,385 |
Calls today: | 2 |
Files: | 14,057 |
Messages: | 6,416,544 |