newbie - cant reference Jquery properly in sharepoint page ...

Aug 3, 2011 at 12:17 PM

folks please forgive me but this is driving me crazy - i read the documenttation.  I tried and failed to get this to work

could someone please help point out where i am going wrong

we use sharepoint 2010 at work - i created a team site of the major site setup within the company

I own the subsite, but not the parent infrastrictucture - to which i can no admin rights

I have the old browser and sharepoint designer 2010 thats all.

I want to reference the jquery libraries and ultimatelty the SP library but clearly not ready for that just yet.

i have downloaded jquery1.6.2 and stored a copy in a directory "\Stlye Library\Scripts\jquery-1.6.2.js"  at top level as seen from sharepoint designer.

I dont want to have edit the v4.master template.

I have tried two things neither work.  First created a new site page from the browser site actions.  when i edit this is sharepoint designer there is alot of non editable template merge code generated from the create process

there is only one bit i can edit here starting at <table  - the rest is yellow read only.

 

   <SharePoint:EmbeddedFormField id="WikiField" FieldName="WikiField" ControlMode="Display" runat="server"><div class="ExternalClass007BDE7C5327416B8A01A7B113D6D1FD"><table id="layoutsTable" style="width:100%"><tbody><tr style="vertical-align:top"><td style="width:100%"><div class="ms-rte-layoutszone-outer" style="width:100%"><div class="ms-rte-layoutszone-inner"></div>
    
     </div></td></tr></tbody></table>
      <div class="ms-rtestate-read ms-rte-wpbox" ><div class="ms-rtestate-read {8b471665-69aa-4112-94b7-874bd788e451}" id="div_{8b471665-69aa-4112-94b7-874bd788e451}"></div><div style="display:none" id="vid_{8b471665-69aa-4112-94b7-874bd788e451}"></div></div>

 

i try and insert the following lines in here.  When i save to the server in sharepoint 2010 - it removes all that code after the refresh.

</asp:Content>

  <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
  <script type="text/javascript" language="javascript" src="/Style Library/Scripts/jquery-1.6.2.js"></script>

<script type="text/javascript" id="myAlert" >

$(document).ready(function) {
 alert ("hello william");
}
</script>
  </asp:Content>

same happens if a create a new page in sharepoint designer directly in site pages.  i get less boilerplate insert - but when i write the content it gets stripped.

 

All i want to do is create a standard site page in sites pages - and reference the jquery, sp libraries etc . 

 

cant seem to do this - what am i doing wrong


cheeers in advance

<!--Assembly Name="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c-->