Rifts Posted July 13, 2010 Share Posted July 13, 2010 Hey everyone I've searched and could not find a php script (or even javascript) that will change text on my site every X amount of seconds. I can only find script that will change once refreshed. can anyone help me out? Thanks Quote Link to comment Share on other sites More sharing options...
dyluck Posted July 13, 2010 Share Posted July 13, 2010 Just doing a quick search on google found that you should be looking at the AJAX side of things to do this. Quote Link to comment Share on other sites More sharing options...
Rifts Posted July 14, 2010 Author Share Posted July 14, 2010 I know nothing about Ajax Quote Link to comment Share on other sites More sharing options...
Alex Posted July 14, 2010 Share Posted July 14, 2010 I know nothing about Ajax Well then it's a good thing there is so much information available about it online, isn't it? Quote Link to comment Share on other sites More sharing options...
Rifts Posted July 14, 2010 Author Share Posted July 14, 2010 OK well I found something is that kind of close to what im looking for and I was wondering if anyone could help.. this is what I found <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <script type="text/javascript"> var clientData = new Array(); clientData[1] = "This is Data for Client 1"; clientData[2] = "This is Data for Client 2"; clientData[3] = "This is Data for Client 3"; clientData[4] = "This is Data for Client 4"; clientData[5] = "This is Data for Client 5"; clientData[6] = "This is Data for Client 6"; clientData[7] = "This is Data for Client 7"; var clientId function swapText(clientId) { document.getElementById("clientInfo").innerHTML = clientData[clientId]; } </script> </head> <body> <table width="100%"> <tr> <td colspan="2" align="center">CLIENTS</td> </tr> <tr> <td> <a href="javascript: swapText(1);">Client 1</a><br /> <a href="javascript: swapText(2);">Client 2</a><br /> <a href="javascript: swapText(3);">Client 3</a><br /> <a href="javascript: swapText(4);">Client 4</a><br /> <a href="javascript: swapText(5);">Client 5</a><br /> <a href="javascript: swapText(6);">Client 6</a><br /> <a href="javascript: swapText(7);">Client 7</a><br /> </td> <td> <span id="clientInfo">Click on a Client for Information.</span> </td> </tr> </table> </body> </html> but I need it to switch every X amount of seconds instead of when you click thanks Quote Link to comment Share on other sites More sharing options...
Vince889 Posted July 15, 2010 Share Posted July 15, 2010 You can use jQuery for that. 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.