How do I reset an inline style? 
Author Message
 How do I reset an inline style?

I am trying to emulate a grid using DHTML and CSS.  I set the table up
the way I want, using inline, predefined stylesheets:

<style type="text/css">
        table           {       align: top;
                                position: absolute;
                                color: black;
                                background-color:white; }
        table.OrigShift {       postop: 5;
                                posleft: 5;
                                z-index:1 }
        table.Persons   {       postop: 5;
                                posleft: 5;
                                z-index:0 }
        thead           {       color: white;
                                background-color: black; }
        tr.evenrow      {       background-color: white; }
        tr.oddrow       {       background-color: C1F7EC; }

I then change the color of the click-on row using, in order to make a
highlighted look:

rowInd = window.event.srcElement.parentElement.rowIndex
OrigShift.rows(rowInd).style.backgroundcolor = "blue"
OrigShift.rows(rowInd).style.color = "white"

Now, if I click on another row, I want all other rows to be reset to
the original style sheets.  I can't figure this out.  I would like to
do this: = "evenrow"

The only thing I can do is set each and every property in script: = "black"
OrigShift.sytle.backgroundcolor = "white"

Is there a way to "reset" the style to the original, or to reset it to
the style defininion name?

Sent via http://www.*-*-*.com/
Before you buy.

Sat, 08 Mar 2003 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Resetting Styles

2. Resetting Custom Bulleted Styles Automatically

3. InsertFile method - resetting styles/formats

4. Reset position of right aligned tab in style definition

5. idea about doing a unix style crypt?

6. Reset without resetting

7. Dynamic Styles: accessing styles w/ jscript

8. ADO thinks DBMS is done, but DBMS ain't done

9. scanning for existence of a style and saying what the style is

10. Customising behaviour of styles in Styles combobox

11. Working with Styles - Finding occurences of specific Styles

12. Browse a document style after style.


Powered by phpBB® Forum Software