|
Home > Archive > Microsoft Content Management Server > October 2004 > JavaScript on Pages.
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
JavaScript on Pages.
|
|
| Kyong Kwak - kkwak at purposedriven 2004-10-26, 5:48 pm |
|
Hi! I wanted to know what the best way to embed javascript to a page.
Should I create a template and place the javascript in the template and create the ONE page? It seems like it defies the nature of templates.. since it'll be good for only ONE page.
Do a create a redirect page that will go outside of the CMS database to get to the page with the javascript? I think this may complicate maintenance..
Any ideas? Thank you!
| |
| Stefan [MSFT] 2004-10-26, 5:48 pm |
| Hi Kyong,
sorry but I don't understand your problem.
Could you please explain in more detail?
Usually javascript will be embedded directly in the template code or by
adding a script reference tag to include an external js file.
Thanks,
Stefan.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
MCMS FAQ:
http://download.microsoft.com/downl...6a/MCMS+2002+-+(complete)+FAQ.htm
MCMS Blog: http://blogs.msdn.com/stefan_gossner/category/4983.aspx
MCMS Sample Code:
http://www.gotdotnet.com/community/...t+S
erver
MCMS Whitepapers and other docs:
http://blogs.msdn.com/stefan_gossne...2/07/41859.aspx
--------------------------------
<Kyong Kwak - kkwak at purposedriven> wrote in message
news:#INKa#5uEHA.3456@TK2MSFTNGP14.phx.gbl...
>
> Hi! I wanted to know what the best way to embed javascript to a page.
> Should I create a template and place the javascript in the template and
create the ONE page? It seems like it defies the nature of templates..
since it'll be good for only ONE page.
>
> Do a create a redirect page that will go outside of the CMS database to
get to the page with the javascript? I think this may complicate
maintenance..
>
> Any ideas? Thank you!
| |
| Kyong Kwak - kkwak at purposedriven 2004-10-26, 5:48 pm |
| Hello Stefan [MSFT],
Thanks for replying quickly!
There was a request for a certain posting/page to have javascript functionality. It is limited to that particular posting/page.
So then what would be the best practice for creating that posting?
(1) would I create a template that contains the javascript then create a posting from there?
(2) would I create a posting that loads an external htm file with the javascript?
(3) or something entirely different?
This is because the HTMLPlaceholder controls strip out JavaScript.
Looking forward to your reply!
Kyong.
[vbcol=seagreen]
> Hi Kyong,
>
> sorry but I don't understand your problem.
> Could you please explain in more detail?
> Usually javascript will be embedded directly in the template code or
> by adding a script reference tag to include an external js file.
>
> Thanks,
> Stefan.
> MCMS FAQ:
>
> http://download.microsoft.com/downl...3a1-4003-9272-2
> 404e92bb76a/MCMS+2002+-+(complete)+FAQ.htm
>
> MCMS Blog: http://blogs.msdn.com/stefan_gossner/category/4983.aspx
>
> MCMS Sample Code:
>
> http://www.gotdotnet.com/community/...aspx?ProductDro
> pDownList=Content+Management+Server
>
> MCMS Whitepapers and other docs:
>
> http://blogs.msdn.com/stefan_gossne...2/07/41859.aspx
>
> --------------------------------
>
> <Kyong Kwak - kkwak at purposedriven> wrote in message
> news:#INKa#5uEHA.3456@TK2MSFTNGP14.phx.gbl...
>
> create the ONE page? It seems like it defies the nature of
> templates.. since it'll be good for only ONE page.
>
> get to the page with the javascript? I think this may complicate
> maintenance..
>
| |
| Justin 2004-10-27, 2:47 am |
| Xref: number1.nntp.dca.giganews.com microsoft.public.cmserver.general:41014
Hi,
If I understand correctly, you have a template that will be used to create n
pages, but only 1 of these pages needs the javascript?
You could use option (1) that you proposed before, then, conditionally
include that script with an if statement if it is the posting that requires
the script. Something like:
<% if p.Guid = "{54545.54355.435345.454354}" %>
<script>
//some javascript
</script>
<% end if %>
You would need to find the posting's GUID
Justin
<Kyong Kwak - kkwak at purposedriven> wrote in message
news:O0lMu16uEHA.1452@TK2MSFTNGP11.phx.gbl...
> Hello Stefan [MSFT],
>
> Thanks for replying quickly!
> There was a request for a certain posting/page to have javascript
functionality. It is limited to that particular posting/page.
>
> So then what would be the best practice for creating that posting?
> (1) would I create a template that contains the javascript then create a
posting from there?
> (2) would I create a posting that loads an external htm file with the
javascript?
> (3) or something entirely different?
>
> This is because the HTMLPlaceholder controls strip out JavaScript.
> Looking forward to your reply!
>
> Kyong.
>
>
>
| |
|
|
| Paul Devenney 2004-10-27, 5:49 pm |
| If I understand the problem correctly I would rephrase it:
"how do I create web Applications that work within the CMS context (eg can
display menus, while still providing descrete application functionality)?"
I have many of these mini-applications running inside CMS sites, and sadly
the easiest way does seem to be to create a template that will only ever
have one posting associated with it. I suggest that you put templates like
this in a seperate gallery, restricted to Administrators.
Not a great help, but that 's my experience...
Paul
"Stefan [MSFT]" <stefang@online.microsoft.com> wrote in message
news:eE6e60$uEHA.1264@TK2MSFTNGP12.phx.gbl...
> Hi Kyong,
>
> I have written a placeholder control that allows to hold Java script:
>
http://www.gotdotnet.com/Community/...e3-5009a962acea
>
> Cheers,
> Stefan
>
> --
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> MCMS FAQ:
>
http://download.microsoft.com/downl...6a/MCMS+2002+-+(complete)+FAQ.htm
> MCMS Blog: http://blogs.msdn.com/stefan_gossner/category/4983.aspx
> MCMS Sample Code:
>
http://www.gotdotnet.com/community/...t+S
erver
> MCMS Whitepapers and other docs:
> http://blogs.msdn.com/stefan_gossne...2/07/41859.aspx
> --------------------------------
>
>
> <Kyong Kwak - kkwak at purposedriven> wrote in message
> news:O0lMu16uEHA.1452@TK2MSFTNGP11.phx.gbl...
> functionality. It is limited to that particular posting/page.
> posting from there?
> javascript?
>
>
|
|
|
|
|