[RESOLVED] focus in firefox trouble
Hi!
I'm trying to use an onclick event on a link to make the page scroll down to a <td> which is labeled with an id.
HTML Code:
<td id="<?php echo $objectnr; ?>..........</td>
To do this I am using this on the link:
Code:
<td onclick="javascript:document.getElementById(\''.$objectnr.'\').focus()" width="15%" align="left" bgcolor="'.$bg_color.'">
<a onmouseover="javascript:this.style.cursor=\'hand\'"> <u><font color="#000000">'.$row["objectnr"].'</font></u></a></td>
As you can see I also want the cursor to change to a hand when being over the objectnumber. Dont worry about the php you see in there, it is taken care of since the whole thing is within a php echo.
Before I used to link down with a normal <a href="#q1">Link</a>, but that did not work in Firefox, so now I tried the above code...
The problem:
This works perfectly in IE but it just wont work with Firefox!
What do I do wrong?
pointer works, but not the focus
Hi!
Now the cursor changer works fine in firefox, thanks, but I would like the focus thing to work too.
Code this far:
Code:
echo '<td onclick="javascript:document.getElementById(\''.$objectnr.'\').focus()" width="15%" align="left" bgcolor="'.$bg_color.'">
<a onmouseover="javascript:this.style.cursor=\'pointer\'"><u><font color="#000000">'.$row["objectnr"].'</font></u></a></td>';
Remainder: The cursor works in both firefox and IE, but the focus isn't working, what do I do?