named anchor problem - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: named anchor problem (/showthread.php?tid=40395) |
named anchor problem - El Forum - 04-07-2011 [eluser]jupiter1031[/eluser] I have a long page with a list of projects. After I go to a detail page I would like to return to the same project in the overview page and not on top of the page. So with difficulties and with a combination of PHP and javascript I built a named anchor solution. This solution works in Chrome only but not in Firefox and IE. Here are the code parts that make it work: 1) From single page go back to overview, I keep the anchor information in a cookie Code: <?php foreach ($records as $row) : ?> 2) I overview I have a simple javascript that onload jumps to the named anchor on the page Code: function moveWindow() 3) The anchor looks like this: Code: <a name="a13"></a> Why does this work only in one browser? But my actual question is how do I get this to work in any browser? Any other solutions I have not thought of? Again what I really want is to come back to the place in my list from where I started. |