WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 HELP!!! - First time building a HTC file, Adam, March 16, 2005

Subject: HELP!!! - First time building a HTC file From: Adam Date: March 16, 2005

Does anyone see why the script below would not work? It is suppose to wrap all HRs with divs onload.  Can anyone help?

Adam

<PUBLIC:COMPONENT>
<PUBLIC:ATTACH EVENT="ondocumentready" HANDLER="fancyHRs" />
<SCRIPT language="JScript">
   function fancyHRs() {  
      if (!document.getElementsByTagName) return; 
             var hr = document.getElementsByTagName("hr");
         for (var i=0; i<hr.length; i++) {
             var newhr = hr[i];
             var wrapdiv = document.createElement('div');
             wrapdiv.className = 'line'; 
             newhr.parentNode.replaceChild(wrapdiv, newhr); 
             wrapdiv.appendChild(newhr);  
      } 
   }                                                                  
</SCRIPT>
</PUBLIC:COMPONENT>

 

I'm calling the HTC file useing

<style type="text/css" media="screen, tv, projection">
   body { behavior:url("/HRstyle.htc"); }
</style>




Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX