syntax error in the below JavaScript
<pre><code>&lt;script type="text/javascript"&gt;
function validate(){
    var valid = true;
     if ( document.&lt;portlet:namespace/&gt;fm.&lt;portlet:namespace/&gt;eventName.value == "" ){
         alert ( "Please Give a valid Event Name!" );
         document.&lt;portlet:namespace/&gt;fm.&lt;portlet:namespace/&gt;eventName.focus();
          valid = false;
     }
     else if ( document.&lt;portlet:namespace/&gt;fm.&lt;portlet:namespace/&gt;triggerOfEvent.value == "" ){
         document.&lt;portlet:namespace/&gt;fm.&lt;portlet:namespace/&gt;triggerOfEvent.focus();
         alert ( "Please select Trigger of Event" );
           valid = false;
     } 
     else ( document.&lt;portlet:namespace/&gt;fm.&lt;portlet:namespace/&gt;nextEvent.value == "" ){
         document.&lt;portlet:namespace/&gt;fm.&lt;portlet:namespace/&gt;nextEvent.focus();
         alert ( "Please select Trigger of Event" );
           valid = false;
     } 
    return valid;
}

&lt;/script&gt;
</code></pre>

<p>This script showing the syntax error like return invalid,statement missing, these type error coming.... 
I missed any thing...can you please let me know friends.....</p>

<p>I am working on liferay portlet development....</p>
