I have a list of people wrapped in a-tags with onclick for opening a popup window.
That popup window contains a previous and next button that invoker a function in the parent window to get the previous/next a-tag and execute the onclick for it.
nextAnchor.onclick();
This should update the popup window with the new persons info, but it doesn't update. Adding an alert("") right after makes it update. What i found searching is something about having to leaving the session before JavaScript will update the display and they suggested using setTimeout.
Problem is i'm calling on a DOM element and i can't send it in to the setTimeout, so i ended up with
setTimeout('eval("'+nextAnchor.getAttribute("onClick")+'")',10);
So is there another way to make it update or a way of making the setTimeout use the onclick of a DOM element or is this an acceptable solution even though it uses eval?