Hello,
I have a javascript function that i want to call and it is in a js file. What i want is to call that function from a php tag.
<?php
….
if( $row_count > 0)
{
echo “<script language=’javascript’ SRC=’javascripts/AddSubjectAndOrganization.js’>disableNextAndPreviousButtons(‘This is the message’)</script>”;
}
?>
But the function disableNextAndPreviousButtons never gets called. I have a alert(“Hello”) in the function but the alert never pops up in the html page calling the function.
I have seen on various forums that we can call a javascript function from a php piece of code if we echo it, but nothing ever happens.
What am i doing wrong?