Reputation: 367
I'm loading a view of my own web into an iframe and into an input field loading some text with:
var f=$('#frameDemo');
f.contents().find("#filter_player").val(_this.attr('user-name'));
and is working fine.
In this input there is a function on keyup which is working if you do it manually but I want to force this keyup() event automatically.
I've tried with
f.contents().find("#filter_player").keyup();
and
f.contents().find("#filter_player").trigger("keyup");
But none is working. Any idea why it could be?
Upvotes: 0
Views: 328
Reputation: 887
You could try to use contentWindow for this purpose:
document.getElementById(‘iframeMsg’).contentWindow.$(‘a.first’).trigger('click');
Upvotes: 1