title: Firing javascript on button click sharepoint
body: <p>All I am trying to accomplish is to call a javascript function when a button is clicked in sharepoint. This is the extent of my 'code' in sharepoint designer 2007...</p>
  
  <pre><code>&lt;%@ Page masterpagefile="~masterurl/default.master" language="C#" title="|" inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bxe2111e8529c" meta:webpartpageexpansion="full" meta:progid="SharePoint.WebPartPage.Document" %&gt;
  &lt;asp:Content id="Content1" runat="server" contentplaceholderid="PlaceHolderMain"&gt;
  &lt;script type="javascript"&gt;
  
  function tellme() {
      alert('yep yep yep');
  }
  
  &lt;/script&gt;
  &lt;p&gt;&lt;/p&gt;
  &lt;asp:Button runat="server" Text="Button" id="Button1" onclientclick="tellme()" /&gt;
  &lt;/asp:Content&gt;
  </code></pre>
  
  <p>Can anyone tell me why the function is not called? When I save the page, view it and click the button, it just acts as a submit button. I'm perfectly happy with JS/HTML and PHP but I'm dabbling in SharePoint / .net and struggling slightly.</p>
  
  <p>Thanks</p>
  
  <p>Tom</p>