hey gang..
any ideas on how I could do this without the button?
So i can execute it from calling a php function
<form><input type=\"button\" onclick=\"alert('Done!')\" value=\"Alert\"></form>
Execute alert from php function
Moderator: General Moderators
you can't call it from php because php parses before or during an http response, therefore php is no longer running by the time the browser renders the output, you could do something like
Code: Select all
onbodyload="javascript:whatever()Code: Select all
function updated() {
echo "<script language=\"JavaScript\">alert('Summary updated!')</script>";
}if you want to do it without the button, just set it up in a <script></script>
Of course, you still need something to trigger that function, as the onClick did in your first post.
Code: Select all
<script type=\"text/javascript\">
function alertText()
{
alert('something');
}
</script>Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.