Pawn Posted April 17, 2009 Share Posted April 17, 2009 The easiest way of explaining this is probably with a link. Check out the list of games under the pie chart at this page. Work in progress. So, my rows are clickable and provide visual feedback as you mouseover, which is what I wanted. It does this with: <script type="text/javascript"> function ChangeColor(tableRow, highLight) { if (highLight) { tableRow.style.backgroundColor = '#666666'; } else { tableRow.style.backgroundColor = '#333333'; } } function DoNav(theUrl) { document.location.href = theUrl; } </script> and <tr onmouseover="ChangeColor(this, true);this.style.cursor='pointer';window.status='http://www.url.tld'; return true" onmouseout="ChangeColor(this, false);"onclick="DoNav('../some/url/');"> I have just one problem with all of that, which might be trivial to some but for me ruins the pie. window.status does not work in Firefox (or with later versions of IE (boo hoo)), so the behaviour isn't consistent with normal links. And I prefer to avoid JavaScript. Can this be done purely with CSS? With a properly updating status bar? Offer cookies! Quote Link to comment https://forums.phpfreaks.com/topic/154531-wanted-method-that-doesnt-suck/ Share on other sites More sharing options...
xtopolis Posted April 18, 2009 Share Posted April 18, 2009 For highlighting links you can use the pseudo hover class. .element:hover { css: declaration; } To get this to work in IE, you'll have to make the row/(probably the <td></td> space) surrounded by an <a> tag as IE doesn't like to recognize hover on normal elements (if I remember correctly). edit: for editing the status bar. it's not really possible. there may be some hacks you can experiment with, but doubtful. Quote Link to comment https://forums.phpfreaks.com/topic/154531-wanted-method-that-doesnt-suck/#findComment-812873 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.