title: OnClick JavaScript for this button or link was encountered:<Object_NAME> is not defined
body: <p>I am trying to call a VF page from Salesforce custom button.
  the code is as follow written under the button.</p>
  
  <pre><code> OnClick JavaScript:
  {!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")} 
   {!REQUIRESCRIPT("/soap/ajax/20.0/apex.js")} 
   window.location= 'apex/PrintExpenseInfo?id='+ Medical_Event_vod__c.id;
  </code></pre>
  
  <p>Can anyone poitn out where is the issue? Its giving me an error like - 
  "A problem with the OnClick JavaScript for this button or link was encountered: is not defined</p>