I've got a page running with a div, into which I load a php page. In this PHP page, I do various things, one of which is, for example, to change a password. When you click "save", it runs the following (I've taken everything away except for the important bit).
function resetPass() {
$(document).trigger("set-alert-id-password", [
{
message: "Must be at least 6 characters long",
priority: "error"
}
]);
}
This is using a Bootstrap library called bsFormAlerts, and is meant to show an alert under the input field created here on the PHP page.
<input type="password" class="form-control" disabled="true" value="******">
<span class="input-group-btn">
<button class="btn btn-default" type="button" onclick="resetPass(this);">
<i class="glyphicon glyphicon-edit"></i>
</button>
<span data-alertid="password"></span>
</span>
This works fine if this input is on the index.html page, but since it is in a PHP file that gets .load()'d into a div on the HTML page it doesn't call.
My question: is there some way that I can call into the div which has now .load()'d another file, as it doesn't seem to call through to it? Anything else I can try?
Thanks in advance
$("#page-wrapper").load("account.php", ......)which is working fine, it's just when I try to call a trigger to the loaded content if that makes sense.