I have a script that iterates through pictures when you hit a "Next" link; the HTML looks like this:
the second argument in the processClick function is the number for the next picture, so that number will change from 1 to 2 to 3, etc. My javaScript that does this looks soemthing like this:HTML Code:<a href = "javascript:next();" id = "next" onclick = "processClick(1, 1); return false;"><span>CSS2</span></a>
next.onclick = function(){processClick(1, num); return false;};
My issue is that when I load the page in IE the script works fine but in Firefox it doesn't do the math correctly. Instead of replacing the num variable with a number when the onclick attribute is reset in the function it leaves the variable as is within the function call, so when I click to go to the next image that attribute gets set as:
How do I get this to display correctly in both ff and IE? Thanks,HTML Code:<a href = "javascript:next();" id = "next" onclick = "processClick(1, num); return false;"><span>CSS2</span></a>
-S



Reply With Quote
Bookmarks