View Single Post
Old 05-25-2011, 02:57 AM   PM User | #3
bullant
Banned

 
Join Date: Feb 2011
Posts: 2,699
Thanks: 13
Thanked 395 Times in 395 Posts
bullant is on a distinguished road
One option is

1) put the div class name and associated url into an "associative" array where the class name is the array key and the class' url is the value

2) put an onclick event handler on each div which calls a single function.

3) pass the div's object reference (this) to the function in 2) when the div is clicked.

4) the function in 2) then opens a new page according to the className associated with the this object.
The new page's url is got from the array in 1)
bullant is offline   Reply With Quote