[thelist] write a style rule for a dynamically generated tag?

Tom Dell'Aringa pixelmech at yahoo.com
Thu Jul 11 15:22:02 CDT 2002


Note, I guess I could do:

m_1, m_2 ... m_21 { style rules }

but I was wondering if there was a better way...
--- Tom Dell'Aringa <pixelmech at yahoo.com> wrote:
> Heyall,
>
> I'm using document.write to write this horrible line of code:
>
> <span id='m_" + i + "' onclick='controlVA(this.id, 20, \"manual\")'
> style='font-size:7px; background-color: "+EQ_BGCOLOR+"; width: 11;
> height: 10; cursor: hand; border-right: 1px solid #003366'
> onmouseover='showBarValue("+i+", \"manual\")'></span>
>
> It writes this out 21 times (for a control) so I have 21 ids that
> range from "m_0" to "m_21".
>
> I would prefer to the presentation info placed up in the style
> sheet
> instead of inline, writing it 20 freaking times. But I can't figure
> if there is a way to do it sine the _# is changing..any ideas?
>
> Tom
>
> =====
> var me = tom.pixelmech.webDeveloper();
> http://www.pixelmech.com/
>
> __________________________________________________
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free
> http://sbc.yahoo.com
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !


=====
var me = tom.pixelmech.webDeveloper();
http://www.pixelmech.com/

__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com



More information about the thelist mailing list