So I am trying to extract data from the result of a submission of a form, that is located inside an iFrame
using injected javascript
.
I do this by using a mouseover
event that activates when the current element is a link and has a particular id.
However, when calling the function submitAction_win0:
var forms = document.getElementsByTagName('form');
submitAction_win0(forms[0],nameOfSomething);
I get
"Uncaught ReferenceError: submitAction_win0 is not defined".
However when I click "View Frame Source" I can find:
function submitAction_win0(form, name){
//some code
}
located in the head before the body.
I also used document.body.innerHTML
to verify if I was looking at the right page and I got the same body HTML.
EDIT: tried putting parent before the function:
parent.submitAction_win0(forms[0],nameOfSomething);
And I received this error:
"Uncaught TypeError: parent.submitAction_win0 is not a function"