this may be more of an html/javascript question, but...
I've got a javascript function defined that displays an alert box notifying the user how many records have been found based on a given query.
<SCRIPT LANGUAGE="JavaScript">
<!--
function DisplayRecordCount(count) {
alert("Number of scholarships found: " + count);
}
-->
</SCRIPT>
Pretty straight forward, right?
Then I get into php. Here's the abridged version of what I'm doing:
$result = mysql_query("SELECT * FROM Scholarships
WHERE School LIKE '$School' OR School LIKE 'All'",$db);
$record = mysql_fetch_array($result);
if ($record) {
...
...
...
do {
...
...
...
$Count = $Count + 1;
}
while
...
...
...
}
Now that $Count has been incremented, I need to call the javascript function. How do I do make this call automatically (i.e. as the page loads)? The kicker is it has to be after $Count is incremented, so it can't go in the body tag as an onLoad() call.