Click to See Complete Forum and Search --> : re: macromedia javascript in external file?


luds
05-07-2003, 07:06 PM
I'm sure that many of you are familiar with the code produced by macromedia's Fireworks software!
I've got a main navigation bar that was produced using fireworks, and I want to put it into an external .js file to reduce file space.
Unfortunately.. I keep getting "MM_nbGroup is not defined" and the rollovers aren't working.
Any ideas?
(for those who haven't seen one of these scripts.. and the horrendous layout!.. view the attachment! lol)

thanks

luds

learninghtml
06-21-2003, 11:37 PM
Originally posted by luds
I want to put it into an external .js file to reduce file space.


Hi,
look at the attached txt file. You will see I have done something similar. The only thing you have to aware of is this...

<script language="JavaScript" src="general.js">

Don't put any additional javascript in here!

</script>

<script language="JavaScript">

Add another script block like this one and put your additional javascript code/functions here.

</script>

For some reason it won't work if you use the "src" to include a js file and put additional functions in same script block.

I had similar errors to yourself until I did the above.

Worth a try, hope it helps...

Regards