Hi want to make sure I'm doing this right. Using FP 03.
What is the best way to copy and apply a script. Just add
it to the html code page? or save it in a file on my web
then somehow attach it?

Where do you save your scipts?

In behaviours I see in the drop down 'call script' should
I use this and if it's a matter of preferance; then how
do I use this correctly?

Thanks

Re: saving and applying scripts by Lisa

Lisa
Tue Jul 13 20:28:29 CDT 2004

Hi,

You can either place the code in the page that uses it, or if you need to
use the script in several different pages, you can put the code into a
separate script file (.js) and call it from each of the pages.

To add the script to an event, don't use the call script item in the
Behaviors task pane. Instead, just modify the HTML as needed to call the
script from the desired event.

Example:

===
1) Here's a simple script.

function functionname()
{
window.alert("message");
}

===
2) To add this script to your Web page, switch to Code view and paste it
between two Script tags, like so:

<script>
function functionname()
{
window.alert("message");
}
</script>

===
3) Then locate the element that you want to access the script and insert
the event that you want to fire the event, and then insert the function
name, like so:

<p onclick="functionname();">click here</p>


--
Lisa Wollin
Programmer Writer
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included code samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
"LA" <anonymous@discussions.microsoft.com> wrote in message
news:2c1ca01c46939$295364c0$a501280a@phx.gbl...
> Hi want to make sure I'm doing this right. Using FP 03.
> What is the best way to copy and apply a script. Just add
> it to the html code page? or save it in a file on my web
> then somehow attach it?
>
> Where do you save your scipts?
>
> In behaviours I see in the drop down 'call script' should
> I use this and if it's a matter of preferance; then how
> do I use this correctly?
>
> Thanks
>



Re: saving and applying scripts by LA

LA
Tue Jul 13 21:09:31 CDT 2004

Thanks

'you can put the code into a
separate script file (.js) and call it from each of the
pages.'

ok how do you call it? and how do I save a .js

Thanks

>-----Original Message-----
>Hi,
>
>You can either place the code in the page that uses it,
or if you need to
>use the script in several different pages, you can put
the code into a
>separate script file (.js) and call it from each of the
pages.
>
>To add the script to an event, don't use the call script
item in the
>Behaviors task pane. Instead, just modify the HTML as
needed to call the
>script from the desired event.
>
>Example:
>
>===
>1) Here's a simple script.
>
>function functionname()
>{
> window.alert("message");
>}
>
>===
>2) To add this script to your Web page, switch to Code
view and paste it
>between two Script tags, like so:
>
><script>
>function functionname()
>{
> window.alert("message");
>}
></script>
>
>===
>3) Then locate the element that you want to access the
script and insert
>the event that you want to fire the event, and then
insert the function
>name, like so:
>
><p onclick="functionname();">click here</p>
>
>
>--
>Lisa Wollin
>Programmer Writer
>Microsoft Corporation
>
>This posting is provided "AS IS" with no warranties, and
confers no rights.
>Use of included code samples are subject to the terms
specified at
>http://www.microsoft.com/info/cpyright.htm.
>"LA" <anonymous@discussions.microsoft.com> wrote in
message
>news:2c1ca01c46939$295364c0$a501280a@phx.gbl...
>> Hi want to make sure I'm doing this right. Using FP 03.
>> What is the best way to copy and apply a script. Just
add
>> it to the html code page? or save it in a file on my
web
>> then somehow attach it?
>>
>> Where do you save your scipts?
>>
>> In behaviours I see in the drop down 'call script'
should
>> I use this and if it's a matter of preferance; then how
>> do I use this correctly?
>>
>> Thanks
>>
>
>
>.
>

Re: saving and applying scripts by Stefan

Stefan
Wed Jul 14 03:52:27 CDT 2004

If you have a script - say
<script language="JavaScript" type="text/javascript"><!-- begin script

function .....
...

//end script --></script>

Copy the contents of the script to Notepad and Save it as yourscriptname.js in your FP Web
- only copy the part inside of the tags:

function .....
...

Then link it in the HEAD section of your page using:

<script language="JavaScript" type="text/javascript" src="yourpath/yourscriptname.js"></script>
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
_____________________________________________


"LA" <anonymous@discussions.microsoft.com> wrote in message news:2c5f201c46947$99d341d0$a401280a@phx.gbl...
| Thanks
|
| 'you can put the code into a
| separate script file (.js) and call it from each of the
| pages.'
|
| ok how do you call it? and how do I save a .js
|
| Thanks
|
| >-----Original Message-----
| >Hi,
| >
| >You can either place the code in the page that uses it,
| or if you need to
| >use the script in several different pages, you can put
| the code into a
| >separate script file (.js) and call it from each of the
| pages.
| >
| >To add the script to an event, don't use the call script
| item in the
| >Behaviors task pane. Instead, just modify the HTML as
| needed to call the
| >script from the desired event.
| >
| >Example:
| >
| >===
| >1) Here's a simple script.
| >
| >function functionname()
| >{
| > window.alert("message");
| >}
| >
| >===
| >2) To add this script to your Web page, switch to Code
| view and paste it
| >between two Script tags, like so:
| >
| ><script>
| >function functionname()
| >{
| > window.alert("message");
| >}
| ></script>
| >
| >===
| >3) Then locate the element that you want to access the
| script and insert
| >the event that you want to fire the event, and then
| insert the function
| >name, like so:
| >
| ><p onclick="functionname();">click here</p>
| >
| >
| >--
| >Lisa Wollin
| >Programmer Writer
| >Microsoft Corporation
| >
| >This posting is provided "AS IS" with no warranties, and
| confers no rights.
| >Use of included code samples are subject to the terms
| specified at
| >http://www.microsoft.com/info/cpyright.htm.
| >"LA" <anonymous@discussions.microsoft.com> wrote in
| message
| >news:2c1ca01c46939$295364c0$a501280a@phx.gbl...
| >> Hi want to make sure I'm doing this right. Using FP 03.
| >> What is the best way to copy and apply a script. Just
| add
| >> it to the html code page? or save it in a file on my
| web
| >> then somehow attach it?
| >>
| >> Where do you save your scipts?
| >>
| >> In behaviours I see in the drop down 'call script'
| should
| >> I use this and if it's a matter of preferance; then how
| >> do I use this correctly?
| >>
| >> Thanks
| >>
| >
| >
| >.
| >



Re: saving and applying scripts by LA

LA
Wed Jul 14 09:16:14 CDT 2004

Ok I've been copying the code and pasting it where noted
header or body. I've been copying and pasting word for
word. including <script> is that corect?

What do you mean by only copy

function .....
....

and link it by

<script language="JavaScript" type="text/javascript"
src="yourpath/yourscriptname.js"></script>

?? Don't I just copy and paste it all together

Also; in behaviours I see in the drop down 'call script'
how does that work?

Thanks!

>-----Original Message-----
>If you have a script - say
><script language="JavaScript" type="text/javascript"><!--
begin script
>
>function .....
>....
>
> //end script --></script>
>
>Copy the contents of the script to Notepad and Save it
as yourscriptname.js in your FP Web
>- only copy the part inside of the tags:
>
>function .....
>....
>
>Then link it in the HEAD section of your page using:
>
><script language="JavaScript" type="text/javascript"
src="yourpath/yourscriptname.js"></script>
>--
>
>_____________________________________________
>SBR @ ENJOY (-: [ Microsoft MVP -
FrontPage ]
>"Warning - Using the F1 Key will not break anything!" (-
;
>To find the best Newsgroup for FrontPage support see:
> http://www.net-sites.com/sitebuilder/newsgroups.asp
>_____________________________________________
>
>
>"LA" <anonymous@discussions.microsoft.com> wrote in
message news:2c5f201c46947$99d341d0$a401280a@phx.gbl...
>| Thanks
>|
>| 'you can put the code into a
>| separate script file (.js) and call it from each of the
>| pages.'
>|
>| ok how do you call it? and how do I save a .js
>|
>| Thanks
>|
>| >-----Original Message-----
>| >Hi,
>| >
>| >You can either place the code in the page that uses
it,
>| or if you need to
>| >use the script in several different pages, you can put
>| the code into a
>| >separate script file (.js) and call it from each of
the
>| pages.
>| >
>| >To add the script to an event, don't use the call
script
>| item in the
>| >Behaviors task pane. Instead, just modify the HTML as
>| needed to call the
>| >script from the desired event.
>| >
>| >Example:
>| >
>| >===
>| >1) Here's a simple script.
>| >
>| >function functionname()
>| >{
>| > window.alert("message");
>| >}
>| >
>| >===
>| >2) To add this script to your Web page, switch to
Code
>| view and paste it
>| >between two Script tags, like so:
>| >
>| ><script>
>| >function functionname()
>| >{
>| > window.alert("message");
>| >}
>| ></script>
>| >
>| >===
>| >3) Then locate the element that you want to access
the
>| script and insert
>| >the event that you want to fire the event, and then
>| insert the function
>| >name, like so:
>| >
>| ><p onclick="functionname();">click here</p>
>| >
>| >
>| >--
>| >Lisa Wollin
>| >Programmer Writer
>| >Microsoft Corporation
>| >
>| >This posting is provided "AS IS" with no warranties,
and
>| confers no rights.
>| >Use of included code samples are subject to the terms
>| specified at
>| >http://www.microsoft.com/info/cpyright.htm.
>| >"LA" <anonymous@discussions.microsoft.com> wrote in
>| message
>| >news:2c1ca01c46939$295364c0$a501280a@phx.gbl...
>| >> Hi want to make sure I'm doing this right. Using FP
03.
>| >> What is the best way to copy and apply a script.
Just
>| add
>| >> it to the html code page? or save it in a file on my
>| web
>| >> then somehow attach it?
>| >>
>| >> Where do you save your scipts?
>| >>
>| >> In behaviours I see in the drop down 'call script'
>| should
>| >> I use this and if it's a matter of preferance; then
how
>| >> do I use this correctly?
>| >>
>| >> Thanks
>| >>
>| >
>| >
>| >.
>| >
>
>
>.
>

Re: saving and applying scripts by Stefan

Stefan
Wed Jul 14 11:04:51 CDT 2004

My instructions are for converting to an External script file
You can also use the script (with the script tags the way you have it ) in the HEAD section

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
_____________________________________________


"LA" <anonymous@discussions.microsoft.com> wrote in message news:2cdfe01c469ad$1f1a1c00$a501280a@phx.gbl...
| Ok I've been copying the code and pasting it where noted
| header or body. I've been copying and pasting word for
| word. including <script> is that corect?
|
| What do you mean by only copy
|
| function .....
| ....
|
| and link it by
|
| <script language="JavaScript" type="text/javascript"
| src="yourpath/yourscriptname.js"></script>
|
| ?? Don't I just copy and paste it all together
|
| Also; in behaviours I see in the drop down 'call script'
| how does that work?
|
| Thanks!
|
| >-----Original Message-----
| >If you have a script - say
| ><script language="JavaScript" type="text/javascript"><!--
| begin script
| >
| >function .....
| >....
| >
| > //end script --></script>
| >
| >Copy the contents of the script to Notepad and Save it
| as yourscriptname.js in your FP Web
| >- only copy the part inside of the tags:
| >
| >function .....
| >....
| >
| >Then link it in the HEAD section of your page using:
| >
| ><script language="JavaScript" type="text/javascript"
| src="yourpath/yourscriptname.js"></script>
| >--
| >
| >_____________________________________________
| >SBR @ ENJOY (-: [ Microsoft MVP -
| FrontPage ]
| >"Warning - Using the F1 Key will not break anything!" (-
| ;
| >To find the best Newsgroup for FrontPage support see:
| > http://www.net-sites.com/sitebuilder/newsgroups.asp
| >_____________________________________________
| >
| >
| >"LA" <anonymous@discussions.microsoft.com> wrote in
| message news:2c5f201c46947$99d341d0$a401280a@phx.gbl...
| >| Thanks
| >|
| >| 'you can put the code into a
| >| separate script file (.js) and call it from each of the
| >| pages.'
| >|
| >| ok how do you call it? and how do I save a .js
| >|
| >| Thanks
| >|
| >| >-----Original Message-----
| >| >Hi,
| >| >
| >| >You can either place the code in the page that uses
| it,
| >| or if you need to
| >| >use the script in several different pages, you can put
| >| the code into a
| >| >separate script file (.js) and call it from each of
| the
| >| pages.
| >| >
| >| >To add the script to an event, don't use the call
| script
| >| item in the
| >| >Behaviors task pane. Instead, just modify the HTML as
| >| needed to call the
| >| >script from the desired event.
| >| >
| >| >Example:
| >| >
| >| >===
| >| >1) Here's a simple script.
| >| >
| >| >function functionname()
| >| >{
| >| > window.alert("message");
| >| >}
| >| >
| >| >===
| >| >2) To add this script to your Web page, switch to
| Code
| >| view and paste it
| >| >between two Script tags, like so:
| >| >
| >| ><script>
| >| >function functionname()
| >| >{
| >| > window.alert("message");
| >| >}
| >| ></script>
| >| >
| >| >===
| >| >3) Then locate the element that you want to access
| the
| >| script and insert
| >| >the event that you want to fire the event, and then
| >| insert the function
| >| >name, like so:
| >| >
| >| ><p onclick="functionname();">click here</p>
| >| >
| >| >
| >| >--
| >| >Lisa Wollin
| >| >Programmer Writer
| >| >Microsoft Corporation
| >| >
| >| >This posting is provided "AS IS" with no warranties,
| and
| >| confers no rights.
| >| >Use of included code samples are subject to the terms
| >| specified at
| >| >http://www.microsoft.com/info/cpyright.htm.
| >| >"LA" <anonymous@discussions.microsoft.com> wrote in
| >| message
| >| >news:2c1ca01c46939$295364c0$a501280a@phx.gbl...
| >| >> Hi want to make sure I'm doing this right. Using FP
| 03.
| >| >> What is the best way to copy and apply a script.
| Just
| >| add
| >| >> it to the html code page? or save it in a file on my
| >| web
| >| >> then somehow attach it?
| >| >>
| >| >> Where do you save your scipts?
| >| >>
| >| >> In behaviours I see in the drop down 'call script'
| >| should
| >| >> I use this and if it's a matter of preferance; then
| how
| >| >> do I use this correctly?
| >| >>
| >| >> Thanks
| >| >>
| >| >
| >| >
| >| >.
| >| >
| >
| >
| >.
| >