Rommeo Posted November 24, 2009 Share Posted November 24, 2009 I have many tables as a result of search query.. and tables keeps photos and texts. and I m trying to make the table clickable as you move the cursor anywhere on the table and you will be able to click even for the areas that has no text. Is it possible to do this ? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
jcombs_31 Posted November 24, 2009 Share Posted November 24, 2009 You'll have to use a little bit of unobtrusive javascript to do it right. Quote Link to comment Share on other sites More sharing options...
Rommeo Posted November 24, 2009 Author Share Posted November 24, 2009 You'll have to use a little bit of unobtrusive javascript to do it right. does that way have a name ? ( so I can google it ) I did it by using css actually. But it only works in firefox.. IE always problem. Quote Link to comment Share on other sites More sharing options...
FaT3oYCG Posted November 24, 2009 Share Posted November 24, 2009 http://gaming-network.ath.cx/tclick.php Quote Link to comment Share on other sites More sharing options...
FaT3oYCG Posted November 26, 2009 Share Posted November 26, 2009 Page taken down. Code: <table border="1" cellspacing="0" cellpadding="20"> <tr> <td onClick="alert('Item 1 Row 1');">Item 1 Row 1</td> <td onClick="alert('Item 2 Row 1');">Item 2 Row 1</td> </tr> <tr> <td onClick="alert('Item 1 Row 2');">Item 1 Row 2</td> <td onClick="alert('Item 2 Row 2');">Item 2 Row 2</td> </tr> </table> <br> <table border="1" cellspacing="0" cellpadding="15"> <tr onClick="alert('Table 2 Row 1 Click');"> <td>Item 1 Row 1</td> <td>Item 2 Row 1</td> </tr> <tr onClick="alert('Table 2 Row 2 Click');"> <td>Item 1 Row 2</td> <td>Item 2 Row 2</td> </tr> </table> <br> <table border="1" cellspacing="0" cellpadding="10" onClick="alert('Table 3 Click');"> <tr> <td>Item 1 Row 1</td> <td>Item 2 Row 1</td> </tr> <tr> <td>Item 1 Row 2</td> <td>Item 2 Row 2</td> </tr> </table> Quote Link to comment Share on other sites More sharing options...
Rommeo Posted November 26, 2009 Author Share Posted November 26, 2009 Thank you so much FaT3oYCG Btw can I use more than one line of code here ; onClick="alert('Table 3 Click'); doSomething(somethinghere); anotherFunction();" Quote Link to comment Share on other sites More sharing options...
FaT3oYCG Posted November 26, 2009 Share Posted November 26, 2009 yes, that is entirley possible or you could create a function in html script tags at the top of the page specifying the javascript type and then just reference the single function that way. If you want to leant javascript then visit w3schhols.com and click the link for Javascript and it will tell you everything that you need to know and more that you dont . Quote Link to comment 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.