I have this line right at the top of my .php file
<?php use_stylesheets_for_form($search_form) ?>
<?php use_javascripts_for_form($search_form) ?>
<div id='div_longgray_gradient2'>
<div id='div_float_img'>
<head>
<script type="text/javascript">
function getMessages()
{
//do stuff here
}
</script>
//some html and php then:
<span class='spn_med_black_rbc' id='new_messages'>You have <?php
echo $new_mail_cnt = '<script type="text/javascript">getMessages(); return false;</script>';
</span>
but when I grep -r "use_javascripts_for_form(" *
it does not find it - is this a function? I need to find out where this is defined, because I call another JS function getMessages and it is not executing it.
When I inspect the element in Chrome I get an error stating that getMessages is not defined, so I assume it's got something to do with the second line at the top?
The function use_javascripts_for_form
is defined in the asset helper, line 647: http://trac.symfony-project.org/browser/branches/1.4/lib/helper/AssetHelper.php#L647