Hi there, my problem seems pretty straight forward I think, possibly I just don't know how to handle IE 6.0 yet. I'm trying to keep my JavaScript unobtrusive to my XHTML and am setting my mouse overs dynamically onload. It goes something like this:
-
for (i = 0; i < menuArray.length; i++){
-
var mouseRoll = document.getElementById(menuArray[i]);
-
var funcName = "menuRoll('" + menuArray[i] + "');";
-
mouseRoll.setAttribute("onmouseover", funcName);
-
}
-
menuArray is an array that contains all the id's of the anchors I want to put mouseovers on and has a length of 0-6. menuRoll is the function I want to call onmouseover. I know that setAttribute is buggy in IE 6.0 so I tried this:
-
for (i = 0; i < menuArray.length; i++){
-
var mouseRoll = document.getElementById(menuArray[i]);
-
var funcName = "'" + menuArray[i] + "'";
-
mouseRoll.onmouseover = function(){menuRoll(funcName)}
-
}
-
this managed to fire the menuRoll function but always sends the value of the last string in the menuArray both in IE 6.0 and FF.
where do i go from here?
cheers
Josh W