home *** CD-ROM | disk | FTP | other *** search
/ Total Java Scripts / Total Java Scripts.iso / Dhtml / button / linkwizard.js < prev    next >
Encoding:
Text File  |  1998-10-31  |  1.1 KB  |  36 lines

  1.  
  2. var checkarray=new Array(6)
  3. checkarray[1]="font-weight:bold; "
  4. checkarray[2]="font-style:italic; "
  5. checkarray[3]="text-decoration:underline; "
  6.  
  7. document.linkeffect.colorvalue.value=''
  8. document.linkeffect.sizevalue.value=''
  9. document.linkeffect.highlightvalue.value=''
  10.  
  11. for (i=0;i<6;i++)
  12. document.linkeffect.thestyles[i].checked=false
  13. function applysheet(){
  14. if (!document.all){
  15. alert("You need IE 4.x to use this tool!")
  16. return
  17. }
  18. checkarray[0]="color:"+document.linkeffect.colorvalue.value+"; "
  19. checkarray[4]="font-size:"+document.linkeffect.sizevalue.value+"; "
  20. checkarray[5]="background-color:"+document.linkeffect.highlightvalue.value+"; "
  21. thesheet=''
  22. for (i=0;i<6;i++){
  23. if (document.linkeffect.thestyles[i].checked==true)
  24. thesheet+=checkarray[i]
  25. }
  26.  
  27. document.styleSheets[0].removeRule(1)
  28. document.styleSheets[0].addRule("a:hover",thesheet)
  29. }
  30.  
  31.  
  32. function generatecss(){
  33. document.csscode.csscode2.value='<!-onMouseover Link CSS Script-⌐ Dynamic Drive (www.dynamicdrive.com). For full source code, installation instructions, 100\'s more DHTML scripts, and Terms Of Use, visit dynamicdrive.com--><style><!--a:hover{'+thesheet+'}--></style>'
  34. }
  35.  
  36.