Hi!
I have this javascript code inside a PHP page:
var jump_name='';
for(var i=0; i < window.parent.group_array.length; i++){
jump_name = window.parent.group_array;
document.write(\"<div id=\" +window.parent.group_array+ \" ondblclick='jump_to(jump_name)'> </div>\");
}
The problem is with the ondblclick call...the value in the called function "jump_to" always ends up being the last value in the array. Instead, I need the value written to be each value in the array as it's looped through.. Any help would be great!
I have this javascript code inside a PHP page:
var jump_name='';
for(var i=0; i < window.parent.group_array.length; i++){
jump_name = window.parent.group_array;
document.write(\"<div id=\" +window.parent.group_array+ \" ondblclick='jump_to(jump_name)'> </div>\");
}
The problem is with the ondblclick call...the value in the called function "jump_to" always ends up being the last value in the array. Instead, I need the value written to be each value in the array as it's looped through.. Any help would be great!