Firefox equivalent for runtimeStyle? Help!

Discussion in 'JavaScript' started by luchosoto, May 27, 2007.

  1. #1
    Hi all, I'm new to this forum and I hope anyone can help me solve this.

    I'm improving a wysiwyg editor I found, and I wrote a script that makes the zero-border tables visible when in edit mode. It works fine in IE but the caveat here is that I can't get the script to work in Firefox b/c the runtimeStyle function doesn't work there.

    The reason I'm using runtimeStyle and not just "style" is that the former doesn't mess with the in-line style of the element (in this case, the table).

    Here's a snippet of the function:

     
      var tables = doc.getElementsByTagName("table"); 
      for(var i=0;i<tables.length;i++) {
       if ( tables[i].getAttribute("border") == 0 || tables[i].getAttribute("border") == null) {//begin if
          if (WYSIWYG_Core.isMSIE) {//if browser is IE
            tables[i].runtimeStyle.border = "1px dashed #cccccc";
             }else{//otherwise,
         (((some function that does the same thing in FF)))
          }
    }
    
    PHP:
    So, Is out there a FF equivalent for runtimeStyle? If so, How can I use it?

    Any suggestions are appreciated.
    cheers!
     
    luchosoto, May 27, 2007 IP
  2. luchosoto

    luchosoto Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Is there a way around this??

    Thanks in advance.
     
    luchosoto, May 28, 2007 IP