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.

RE: Adding javascript to Default.aspx? by JM

JM
Fri Nov 11 11:16:06 CST 2005

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.

RE: Adding javascript to Default.aspx? by hsolomonemail-nntp

hsolomonemail-nntp
Fri Nov 11 12:59:02 CST 2005

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.

RE: Adding javascript to Default.aspx? by JM

JM
Fri Nov 11 17:01:02 CST 2005

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.

RE: Adding javascript to Default.aspx? by hsolomonemail-nntp

hsolomonemail-nntp
Mon Nov 14 10:01:07 CST 2005

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.

RE: Adding javascript to Default.aspx? by JM

JM
Wed Nov 16 15:27:49 CST 2005

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.

RE: Adding javascript to Default.aspx? by JM

JM
Wed Nov 16 15:39:16 CST 2005

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.

RE: Adding javascript to Default.aspx? by hsolomonemail-nntp

hsolomonemail-nntp
Thu Nov 17 08:52:06 CST 2005

Excluded paths that I have added in the past have always resided in an
Inetpub/wwwroot folder, not in the SharePoint 60 directories. Have you tried
moving it to there, excluding the path and then running it?
--
Heather Solomon, MVP WSS
http://www.heathersolomon.com/blog


"JM" wrote:

> 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.

RE: Adding javascript to Default.aspx? by JM

JM
Thu Nov 17 09:36:08 CST 2005

Thanks that helps. Guess I'm still unsure how WSS and Inetpub/wwwroot work
together. I don't really know where to put all the pieces. To recap:
I have a "intraheader.js" file that I reference in my Onet.xml file, and
this "intraheader.js" includes a "cmgshared/intraheader.asp" page. Where
should these files be? Should the .js file be in layouts?

Here is what I've done (but is not working):
1. Onet.xml : contains CustomJSUrl="/_layouts/IntraHeader.js"
2. ...60\TEMPLATE\LAYOUTS contains the IntraHeader.js file
3. IntraHeader.js contains: <script language="JavaScript"
src="/cmgshared/includes/IntraHeader.asp?tabStyle=intranet&tabSelected=2"></script>
4. cmgshared is located under inetpub/wwwroot and I made it a virtual
directory in IIS (not sure if I needed to).
5. My WSS excluded paths contains /cmgshared

But, when I use my new template, it doesn't pull in my header from the
intraheader.asp page. I still see it in the View Source as:
<SCRIPT language='javascript' src='/_layouts/IntraHeader.js'></SCRIPT>

Can you see what I'm still doing wrong?

Thanks so much for all your help so far,
JM


"Heather Solomon [MVP]" wrote:

> Excluded paths that I have added in the past have always resided in an
> Inetpub/wwwroot folder, not in the SharePoint 60 directories. Have you tried
> moving it to there, excluding the path and then running it?
> --
> Heather Solomon, MVP WSS
> http://www.heathersolomon.com/blog
>
>
> "JM" wrote:
>
> > 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.

Re: Adding javascript to Default.aspx? by Vitor

Vitor
Thu Nov 17 10:51:53 CST 2005

Hi

I also have a few troubles with this CustomJSUrl method for including
custom .js files.

Since I never liked to change the base SharePoint scripts, gladly
tried to follow a few articles on adding custom .js files to SharePoint
(I am using WSS, not SPS) like this one:
http://dev.collutions.com/blogs/sample/DisplayPost.aspx?PostID=8

1- Changed CustomJSUrl in onet.xml trying to ad an external js file
2- Put the .js file in ... so many places and could not get it read by
the system
4- In the end I had to get back ... and change ows.js , adding the
scripts to it :(( to make things work.

Why doesn't this CustomJSUrl method work with me? (and JM?)
-Does this work differently in SPS and WSS?
-Do I have to put the .js in a "Excluded path" ? Never read about
that.

Can someone please have the patience to post here a "complete" example
with the exact instructions on how to add a custom js script with all
the steps, the folders, SRC &/or URL of the .js custom script, etc.? Ah
... but .... please! An example that you have running in a machine of
yours because I have seen a few "tutorials" too.
Even have tried to follow a "step by step" (Lab DEV-6: Adding custom
commands to the user interface) by Microsoft via
www.sharepointcustomization.com and ... noooooothing! I Can't get the
.js file read by SharePoint this way. But included in ows.js it works
fine.

Thanks in advance

Vitor Cardoso
-------------------
Lisbon - Portugal


Re: Adding javascript to Default.aspx? by hsolomonemail-nntp

hsolomonemail-nntp
Thu Nov 17 15:00:11 CST 2005

A search in Google can provide several resources such as:

http://dev.collutions.com/blogs/sample/DisplayPost.aspx?PostID=8
http://www.sharepointblogs.com/dustin/archive/2004/08/24/718.aspx
http://sharepointadvisor.com/doc/16799?open&p=5

Although I don't think I have ever seen a single resource outlining steps
from A-Z. I suggest you repost your request for a complete example back to
the newsgroups as a new topic if the above links don't help.

Are you resetting IIS after you make the alterations to the ONET file?

And no you don't have to place the JS file in an excluded path. Excluded
paths are path you tell SharePoint to ignore and not process. This allows
you to store other items on the server that SharePoint would otherwise try to
process and throw erros on. More info:
http://www.microsoft.com/resources/documentation/wss/2/all/adminguide/en-us/stsf05.mspx
--
Heather Solomon, MVP WSS
http://www.heathersolomon.com/blog


"Vitor Cardoso" wrote:

> Hi
>
> I also have a few troubles with this CustomJSUrl method for including
> custom .js files.
>
> Since I never liked to change the base SharePoint scripts, gladly
> tried to follow a few articles on adding custom .js files to SharePoint
> (I am using WSS, not SPS) like this one:
> http://dev.collutions.com/blogs/sample/DisplayPost.aspx?PostID=8
>
> 1- Changed CustomJSUrl in onet.xml trying to ad an external js file
> 2- Put the .js file in ... so many places and could not get it read by
> the system
> 4- In the end I had to get back ... and change ows.js , adding the
> scripts to it :(( to make things work.
>
> Why doesn't this CustomJSUrl method work with me? (and JM?)
> -Does this work differently in SPS and WSS?
> -Do I have to put the .js in a "Excluded path" ? Never read about
> that.
>
> Can someone please have the patience to post here a "complete" example
> with the exact instructions on how to add a custom js script with all
> the steps, the folders, SRC &/or URL of the .js custom script, etc.? Ah
> .... but .... please! An example that you have running in a machine of
> yours because I have seen a few "tutorials" too.
> Even have tried to follow a "step by step" (Lab DEV-6: Adding custom
> commands to the user interface) by Microsoft via
> www.sharepointcustomization.com and ... noooooothing! I Can't get the
> ..js file read by SharePoint this way. But included in ows.js it works
> fine.
>
> Thanks in advance
>
> Vitor Cardoso
> -------------------
> Lisbon - Portugal
>
>

RE: Adding javascript to Default.aspx? by JM

JM
Tue Dec 13 17:04:02 CST 2005

I worked directly with Microsoft support to resolve it. It took awhile, so
here is the resolution in summary.

To recap, I wanted to include an existing "OurHeader.asp" page in my
SharePoint template to pull in our corporate header. To get this to work, I
had to:

1. First create a site template using the "Creating a Site Definition from
an Existing Site Definition" instructions from the MSDN site.

2. I could not use the "customjsurl" attribute of the onet.xml file since
my JavaScript included a script block; e.g.
<script language="JavaScript" src="http://inside/OurHeader.asp></script>

3. I needed to include the JavaScript line in the default.aspx page
directly; i.e.
Edit the default.aspx page located in:
C:\Program Files\Common Files\Microsoft Shared\web server
extensions\60\TEMPLATE\1033\STSYourTemplate and put the JavaScript below the
<HEAD> tag. You may need to do an IISReset before using it.

4. You need to do this on every .aspx page under the template directory
that you want your corporate header to appear on. (I'm still researching
whether there are any shortcuts to this). Your pages will remain ghosted
with this method.

Alternatively, here is an explanation of how to "brand" your site with your
corporate header:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_SP2003_ta/html/Office_SharePointHowToApplyBrand.asp
However, we wanted to use our existing "OurHeader.asp" page for consistancy
since it is widely used in our company.

HTH,
JM


"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.