dotkpay Posted June 22, 2011 Share Posted June 22, 2011 Hello, Am looking for a way to link the onclick events of several objects to varying links. For example: If I have a table with three columns which I want to link to different scripts with the onclick event: <table><tr> <td onclick="link_1">Good Morning</td> <td onclick="link_2">Good Afternoon</td> <td onclick="link_3">Good Evening</td> </tr></table> I imagine there will be a need for a js function that is called with a different link in each case using php variables as well. Could someone please show me a way to go about this. Thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/240134-onclick-link/ Share on other sites More sharing options...
fugix Posted June 22, 2011 Share Posted June 22, 2011 Onclick="window.location.href='http://www.example.com'" Is something like that what you had in mind? Quote Link to comment https://forums.phpfreaks.com/topic/240134-onclick-link/#findComment-1233450 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.