//get the IFRAME element - note no hashes in the name, we're using browser functionality
var iframeRef = document.getElementById("IFRAMEID");//focus the IFRAME element
$(iframeRef).focus();
//use JQuery to find the control in the IFRAME and set focus
$(iframeRef).contents().find("#CONTROLID").focus();
Source
It worked, thanks! :)
ReplyDeleteVipul Limbachiya (http://vipullimbachiya.com)
var iframeRef = document.getElementById("IFRAMEID");
ReplyDeleteI don't know what makes this line different from $("#IFRAMEID")... but it does the trick... thanks...