Putting this external

Hi,

I need to place some javascript code in an external file. I just need a basic rollover is there an action for this, as I do not need all the features of the rollover action.

The code above is generated by freeway (version 4 pro) and I need to place this in an external js file, how should I do this?

I just need to know what the correct syntax is, as I know you lose the script type etc… in the external js file.

Thanks
Barry


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

The first two blocks of script you have above contains conditional comments. These would not work inside an external script, you would need to keep them in the HTML. The third one would be ripe for moving out of the page.

In your external file, start with the word function and end with the last closing brace } – in other words, remove the comments and the script tags. Save this file in a proper text editor with a filename that ends in .js.

In your page, open the HTML Markup dialog and paste the first two blocks of script (and their script tags and comments) into the After HEAD section. Then apply the External JavaScript Action to the page, and select your JavaScript file and choose Before /HEAD for the location.

This should get your scripts in the right order, and the Action will manage the upload and linking of the external JavaScript file.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Walt

Thanks as always… now I know that for future, I knew how to put the function onwards… it was the cdata etc at the top that confused me.

I have moved on from here and need help off anyone.

I finally got some code to work for my page for the feature I wanted, it works fine in firefox and safari, but fails in explorer…

Now the if you look at these two pages you can see what I mean.

The first one with the rollover is what I need and works in safari but when you click the image in explorer it just opens the image.

Take a look and see what I mean.

The rolls.js file is what control the rollovers.
I have just one on the page at present.

1: Rollover version
http://www.liquivac.co.uk/development/identify_your_solution.html

2: Non Rollover version
http://www.liquivac.co.uk/development/identify_your_solution2.html

As you can see the second one works in windows explorer but has no rollover so it must be something in the js file rolls.js that is causing the problem.

Any help appreciated


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options