RE: Adding javascript to Default.aspx?



As a followup, I've been trying to figure out how/where to add this to the
Excluded Paths, but am confused about what to enter as the path. I can move
the cmgshare folder so that it is more accessible but where? It's confusing
how the SharePoint URL corresponds to a path on the server.

"JM" wrote:

> Heather,
> I was able to get past this point (just ended up starting over - I'm not
> sure what I did wrong the first time).
>
> Now, I can see my new template in the list when I create a new site. My
> header code isn't getting run though. I have a IntraHeader.js file on
> C:\Microsoft Shared\Web Server Extensions\60\TEMPLATE\LAYOUTS which has
> script to call my header.asp code; ie:
> <script language="JavaScript"
> src="/_layouts/cmgshared/includes/IntraHeader.asp?tabStyle=intranet&tabSelected=2"></script>
>
> When I create a new site based on this template and I do a view source, I
> see the javascript line, but it didn't run my IntraHeader.asp page. Is there
> something more I need to do to get it to run ASP from inside a SharePoint
> page? Maybe I need to put the "cmgshared" folder that contains the asp file
> and supporting files somewhere else?
> Thanks in advance,
> Joan
>
>
> "Heather Solomon [MVP]" wrote:
>
> > Did you restart IIS after adding the new template? Have you tried using a
> > different ID number in the Template element?
> > --
> > Heather Solomon, MVP WSS
> > http://www.heathersolomon.com/blog
> >
> >
> > "JM" wrote:
> >
> > > Heather,
> > > Thanks very much for the info. That's just the kind of help I was hoping
> > > for. I'm hoping you can now help me with an error I've run into.
> > > I followed the instructions for "Creating a Site Definition from an Existing
> > > Site Definition" as a start. I copied the STS folder to "STSCMG" and added a
> > > "cmgshared" folder under it with images, etc. I then copied the WEBTEMP.XML
> > > to WEBTEMPCMG.XML, which I then changed to:
> > > <?xml version="1.0" encoding="utf-8" ?>
> > > <Templates xmlns:ows="Microsoft SharePoint">
> > > <Template Name="STSCMG" ID="10001">
> > > <Configuration ID="0" Title="SharePoint Project Notebook" Type=0
> > > Hidden="FALSE"
> > > ImageUrl="/cmgshared/images/cmg.gif"
> > > Description="This template creates a Project Notebook site for teams to
> > > create, organize, and share project information.">
> > > </Configuration>
> > > </Templates>
> > >
> > > I tried to create a new site based on this template, but when I try to
> > > create it I get the error ""Value does not fall within the expected range.".
> > > I just wanted to see if I could get this far before changing the onet.xml
> > > file to use the customjsurl. Do you have any ideas what might be wrong? (I
> > > now realize how breakable WSS is!).
> > > Thanks,
> > > JM
> > >
> > >
> > >
> > >
> > > "Heather Solomon [MVP]" wrote:
> > >
> > > > You can add custom JavaScript to run on the entire site, or add it to an
> > > > individual page.
> > > >
> > > > Whole site: specify the JavaScript file in the ONET.xml file.
> > > > ONET.XML file location: \TEMPLATE\1033\STS\XML
> > > > Element to alter: PROJECT - Add the "CustomJSUrl" attribute
> > > > More info:
> > > > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/spptsdk/html/tscamlproject_SV01028126.asp
> > > >
> > > > Individual Page: Add a Content Editor Web Part (CEWP) to the page, edit it
> > > > using the Source Editor and add your JavaScript there. Next set the CEWP to
> > > > hide under the Layout menu in the CEWP tool pane. This will hide the web
> > > > part from the users, but the scripts will still run when the page loads.
> > > > --
> > > > Heather Solomon, MVP WSS
> > > > http://www.heathersolomon.com/blog
> > > >
> > > >
> > > > "JM" wrote:
> > > >
> > > > > I found the info about how/where WSS pages run (sorry for not looking more
> > > > > thoroughly first) from:
> > > > > http://msdn.microsoft.com/msdnmag/issues/04/07/WindowsSharePointServices/default.aspx
> > > > >
> > > > > I'm still not understanding about how to add the javascript line to run an
> > > > > .asp page to pull in our corporate header though, so if anyone can help me
> > > > > with that, I'd appreciate it!
> > > > > TIA
> > > > >
> > > > > "JM" wrote:
> > > > >
> > > > > > Hello,
> > > > > >
> > > > > > I'm trying to quickly get a new WSS site up for our company. Our company
> > > > > > has numerous websites that use the same header (which is either inherited in
> > > > > > an asp.net app or embedded with an asp page using javascript for asp pages).
> > > > > > I'm trying to do the same thing on a WSS page using FrontPage (I'm new to
> > > > > > Frontpage, I'm used to VS.NET v2002). I tried just putting the javascript
> > > > > > tag at the top but this doesn't seem to do anything.
> > > > > > The other thing that confuses me is where the WSS pages are running from?
> > > > > > When I look under C:\Inetpub, I don't see a corresponding site for my pages.
> > > > > > And when I look in IIS I also don't find any corresponding sites.
> > > > > > Any help to point me in the right direction would be appreciated.
> > > > > > TIA.
.



Relevant Pages

  • RE: Adding javascript to Default.aspx?
    ... When I create a new site based on this template and I do a view source, ... see the javascript line, but it didn't run my IntraHeader.asp page. ... > Heather Solomon, MVP WSS ... >>> Heather Solomon, MVP WSS ...
    (microsoft.public.sharepoint.windowsservices)
  • RE: Adding javascript to Default.aspx?
    ... Did you restart IIS after adding the new template? ... specify the JavaScript file in the ONET.xml file. ... >> Heather Solomon, MVP WSS ...
    (microsoft.public.sharepoint.windowsservices)
  • RE: Document template
    ... Heather and Mike, ... The folder on the site has spaces too). ... suggestions) and now the template B2929.dwg is OK. ... I would also try using different file paths (for example don't specify ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: NORMAL DOT Mystery
    ... Use your own template as a document template. ... Word MVP web site http://word.mvps.org ... I find it confusing as ... custom DOT file is located in? ...
    (microsoft.public.word.docmanagement)
  • Re: delete templates from the file
    ... Basically a template *is* a file that's used to ... generate new document files & there's no reason for them to "gets too big ... the file gets too big and confusing. ...
    (microsoft.public.mac.office.word)