JavaScript

Did you know that, when using JavaScript, you can’t have the same name for variables or functions if you have more than one piece of scripting on a page? I learned that today – the hard way. I inserted script that rotates images in two places (for two different sets of images) and it failed. I figured out quickly that the variables had to be different, but it took me some time to reach the conclusion that I also needed to change the function name.

Part of the reason for the delay is that I assumed I had just messed up the variables and so I spent time going over and over those until I was confident that they had no problems.

Bottom line: my scripts work now and I couldn’t be happier.

Now it’s time to go finish painting the bathroom in the nursery.

This entry was posted in Donald. Bookmark the permalink.

Leave a Reply