Jump to content

php script to change text without refreshing?


Rifts

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.