javascript - fire external script background with js? -
is possible fire execution of script in background via click?
within cms/crm , want trigger external file load when clicking on link within cms/crm.
e.g. activate php.mailer send email.
it seems security issue when using (cross domain vulnerability?)
foobar.onload()
and if weren't, not execute file in background. have seen solved in python using
subprocessor()
.
the external script on domain though , not touch cms / crm.
ideas?
in javascript can't access filesystem, can use ajax request url differents methods (get, post...).
the script called url can execute function send email if want.
if know jquery, can in javascript
$.get("myscript.php");
and in myscript.php file :
mail('you@mailhost.com', 'hello', 'cool !');
and if php script not on same domain, should check access-control-allow-origin header allow client (the browser execute ajax script) call remote php script
Comments
Post a Comment