Adding javascript to Default.aspx?
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
Adding javascript to Default.aspx?

 
Post new topic   Reply to topic    Windows Server Forum Index -> Windows Services
Author Message
JM
Guest





Posted: Fri Nov 11, 2005 5:51 pm    Post subject: Adding javascript to Default.aspx? Reply with quote

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.
Back to top
JM
Guest





Posted: Fri Nov 11, 2005 5:51 pm    Post subject: RE: Adding javascript to Default.aspx? Reply with quote

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:

Quote:
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.
Back to top
Heather Solomon [MVP]
Guest





Posted: Fri Nov 11, 2005 9:51 pm    Post subject: RE: Adding javascript to Default.aspx? Reply with quote

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:

Quote:
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.
Back to top
JM
Guest





Posted: Sat Nov 12, 2005 1:50 am    Post subject: RE: Adding javascript to Default.aspx? Reply with quote

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:

Quote:
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.
Back to top
Heather Solomon [MVP]
Guest





Posted: Mon Nov 14, 2005 5:50 pm    Post subject: RE: Adding javascript to Default.aspx? Reply with quote

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:

Quote:
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.
Back to top
 
Post new topic   Reply to topic    Windows Server Forum Index -> Windows Services All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB