Posted By

SDPope on 06/04/10


Tagged

updateboxsite buttonjavascript


Versions (?)

Update Box w/take me to site button


 / Published in: JavaScript
 

  1. <table border="0" cellspacing="0" cellpadding="0">
  2. <tr>
  3. <td width="100%"><form name="slideshow"><div align="center"><center><p><b>What's On Update</b><br><textarea rows="5" name="S1" cols="30" wrap="virtual"></textarea><br>
  4. <input type="button" value="Take me there!" name="B1" onClick="window.location=messagelinks[curmsg]"></p>
  5. </center></div>
  6. </form>
  7. </td>
  8. </tr>
  9. </table>
  10.  
  11. <script>
  12. /*
  13. Message Slideshow
  14. By Website Abstraction (www.wsabstract.com)
  15. and Java-scripts.net (www.java-scripts.net)
  16. Credits must stay intact for use
  17. */
  18.  
  19. var curmsg=-1
  20. var messages=new Array()
  21. messages[0]="Hundreds of great free backgrounds for the taking!"
  22. messages[1]="Comprehensive DHTML scripts and components for your site!"
  23. messages[2]="The JavaScript Technology center"
  24. //add more messages as desired
  25.  
  26. var messagelinks=new Array()
  27. messagelinks[0]="http://www.free-backgrounds.com"
  28. messagelinks[1]="http://www.dynamicdrive.com"
  29. messagelinks[2]="http://www.wsabstract.com"
  30. //add more links as indicated by the number of messages
  31.  
  32. function slidemessage(){
  33. if (curmsg<messages.length-1)
  34. curmsg++
  35. else
  36. curmsg=0
  37. document.slideshow[0].value=messages[curmsg]
  38. setTimeout("slidemessage()",4500)
  39. }
  40. slidemessage()
  41. </script>

Report this snippet  

You need to login to post a comment.