functions.php: start webbuild function after document load

This commit is contained in:
Silvan Calarco 2020-06-17 18:05:14 +02:00
parent b3ff8169da
commit 5c3db77c81

View File

@ -208,8 +208,9 @@ function openmamba_webbuild_func( $atts ) {
print fread($file, 20000);
flush();
fclose($file);
print "<script>ajax_getvalues(\"" . $urlargs . "\",\"\");";
print "ajax_getvalues_refresh(\"\",user,user_email,encodeURIComponent(secret));</script>";
print "<script>$(document).ready(function(){ ajax_getvalues(\"" . $urlargs . "\",\"\");";
print "ajax_getvalues_refresh(\"\",user,user_email,encodeURIComponent(secret)); })</script>";
}
add_shortcode('openmamba_webbuild', 'openmamba_webbuild_func');