Re: saving and applying scripts

From: LA (anonymous_at_discussions.microsoft.com)
Date: 07/14/04


Date: Wed, 14 Jul 2004 07:16:14 -0700

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



Relevant Pages

  • Re: program to copy files - problems - unix ksh to java
    ... > copying. ... sounds like the first process, when finished, deletes the file, ... I expected the script to wait for the copy to finish before ... > deleting, but it appears that it is not doing that. ...
    (comp.lang.java.programmer)
  • Re: program to copy files - problems - unix ksh to java
    ... > I've got a shell script that does some file copying and deleting. ... Since I plan on re-writing it with java, ...
    (comp.lang.java.programmer)
  • Warning of Possible jpeg corruption [was Re: [opensuse] bash scripts from file manager in kde]
    ... I know how to execute the scripts from the command ... Always confirm that jpeg have been copied correctly by opening the image up in gimp/kview/feh whatever before overwriting the original on the memory card. ... I don't know why this occurs, but I have experienced this corruption a number of times copying files within bash scripts from flash cards mounted under /media/disk. ... I've just gone back to using digikam to download images from cameras rather than pulling the flash card and copying the files directly from the memory stick via a card-reader and bash script. ...
    (SuSE)
  • RE: simple
    ... with varaiable like this copying doesn't work: ... objFSO.CopyFile source, destination, OverwriteExisting ... Precisely saying I would like to write a a very simple script that could ... > Do You know how to pass a parameters to a procedure CopyFile ...
    (microsoft.public.windows.server.scripting)
  • Script to create AD and Exchange user account by copying existing account?
    ... copying user accounts to create new user accounts. ... Since I'm running Exchange 2007, ... I'd like the ability to create a script and pass in some ...
    (microsoft.public.windows.server.scripting)