This function executes no problem as the border styling works as does the alert that is currently commented out. The thing that isn't working is the alert(alertStr) part of the code (line 10) at the end of the for in loop. My browser won't alert the string that has been built in the loop.

Any ideas?

EDIT: After some more playing around with it. It seems that any code after the for in loop does not execute, which is strange as I thought JS ran top to bottom?

This post has been edited by RyanRobinson: 19 September 2012 - 03:26 PM