And delete the invalid script starting with
<script LANGUAGE=""JavaScript"">
<!--
and ending with
// -->
</script>
| When moving script to an external file you move everything between, but not
| including, the <script> and </script> tags. You also delete <!-- and //-->
| at the beginning and end
|
| So in your case, the JS file will read
| function load(form) {
| var url = form.list.options[form.list.selectedIndex].value;
| if (url != "") location.href = url; return false;}
|
| In the HTML you place this in the <head> section
| <script LANGUAGE="JavaScript" src="myscript-menu1.js">
| </script>
|
| The code in the body should not need to change
| --
| Cheers,
| Trevor L., WIP (Web Interested Person)
| Website:
http://tandcl.homemail.com.au
|
| Fred wrote:
| > Hi Thomas,
| >
| > Sorry for using the wrong terminology. I should have said hidden from
| > the search engine spider when the page is crawled. Let me rephrase my
| > question. I assume that this is all that is placed in the <head> of
| > the page or can this also 'hidden' <script
| > LANGUAGE="JavaScript"><!--function load(form) {var url =
| > form.list.options[form.list.selectedIndex].value;if (url != "")
| > location.href = url; return false;}// --></script> Note that all
| > spacing has been removed.
| > And how much of the code in the <body> between <form NAME="menu1"> and
| > </select> </form>
| > do I save to a ( plain text file say using notepad) which I would call
| > myscript-menu1.js and save to my root and what text do I place in the
| > <body> where I want the menu to appear. Fred
| >
| >
| > | >> The code is not hidden when you place it in a external .js file,
| >> actually it make it easier to "borrow" since it is in a single file
| >> download to the user's browser's cache folder.
| >>
| >> --
| >> ==============================================
| >> Thomas A. Rowe (Microsoft MVP - FrontPage)
| >> ==============================================
| >> If you feel your current issue is a results of installing
| >> a Service Pack or security update, please contact
| >> Microsoft Product Support Services:
| >>
http://support.microsoft.com
| >> If the problem can be shown to have been caused by a
| >> security update, then there is usually no charge for the call.
| >> ==============================================
| >>
| >> | >> BlankCould some kind person take a look at the source page of
| >>
http://www.all-inclusive-hotels.co.uk/ and show me how to hide the
| >> long code for both the drop down menu's. I know I can save the code
| >> to say mysripts-menu1.js but I'm not sure how much of the code I
| >> have to "hide" and what I place in the <body> to call it up on
| >> loading. Any help would be much appreciated. Fred
|
|