PDA

View Full Version : Please help



shadowhawk
Mar 15th, 2007, 07:44 PM
I have been working on this assignment for a couple weeks and cannot figure out where I have gone wrong. I am attaching a zip file with all the relevant files and the various coding I have attempted. Any assitance in this matter would be appreciated. I am not looking for someone to do this FOR me, but I am looking for someone to help guide me in the right direction.

My situation is this:
I need to create a javascript page with the following provisos:
1. The upper 1/3 must be a Cycling banner
2. The middle 1/3 must be a Random images banner
3. The final 1/3 must be a slideshow.

My results:
I can get the first 1/3 to show the "lions.gif" file but not cycle.
I can get the middle 1/3 to show the "lions.gif" but not randomly cycle
I can get the final 1/3 to show the "lions.gif" and it responds to javascript:doNext() and javascript:doBack(), but they appear randomly.

Individually the code parts work...but when placed together they do not. I have included the individual portions as well...titled js-eight.html, js-nine.html and js-ten.html respective to cycling, random, slideshow.

I am using both IE 7 and Firefox latest version with the same results.

nikkiH
Mar 15th, 2007, 10:53 PM
I'm sorry I don't have a lot of time to look, but you say this:
"Individually the code parts work...but when placed together they do not."

The biggest reason for this is that you made the scripts all separate, and used the same variable names for things. When you stick it together, they clash. Check that your variables are named uniquely for each piece.
Also check the error console (firefox) for script errors. If you're using IE, there is a developer toolbar for it available at the microsoft site.

shadowhawk
Mar 18th, 2007, 05:23 PM
I'm sorry I don't have a lot of time to look, but you say this:
"Individually the code parts work...but when placed together they do not."

The biggest reason for this is that you made the scripts all separate, and used the same variable names for things. When you stick it together, they clash. Check that your variables are named uniquely for each piece.
Also check the error console (firefox) for script errors. If you're using IE, there is a developer toolbar for it available at the microsoft site.
Not getting any errors in Firefox or in IE. That's what I don't understand. No errors, but it is not working.

Philip M
Mar 18th, 2007, 05:48 PM
As nikkiH has pointed out, you may not have two or more functions or variables with the same name. Check that your functions and variables are named uniquely for each piece. So for example if you have a loop for (var x=0; x<5; x++) in one script you may not have another (global) variable called x in another script.