javascript - Call function from Ajax reloaded page -
with ajax request reload page , based on conditions database want call javascript function on main page (because need variables main page).
php code:
if($reset_regionaal == 1 or $reset_landelijk == 1 or $reset_extra == 1){ echo "<script>window.resetopties(".$reset_regionaal.",".$reset_landelijk.",".$reset_regionaal.");</script>"; }
js code:
function resetopties(regionaal_opvallen_reset, landelijk_opvallen_reset, extra_opvallen_reset){ alert(regionaal_opvallen); };
but not work, not execute function. function simplified of course
if function called before defined, won't execute , cause error.
Comments
Post a Comment