I have div call pageBplaceHolder on pageA.html, in when the user click some functions, a pageBplaceHolder will load pageB.html.
var menu_request = $.ajax({
url: pageB.html,
type: 'GET',
dataType: 'html'
});
In pageB.html, I have a input element id called inputField.
So, I would like to have control the inputField in the pageA.html JavaScript.
For example, I would like to focus it, but I can’t do that by using:
$('#inputField').focus();
How can I achieve it?
1 Answer