What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » am i blind?

am i blind?
Author: Message:
WDZ
Former Admin
*****

Avatar

Posts: 7106
Reputation: 107
– / Male / Flag
Joined: Mar 2002
RE: am i blind?
Yeah, id attributes need to be unique, so you can't have two elements with id="foo" on the same page.

You could change id="foo" to class="foo" and then use a loop like this to go through them all...

code:
function fontsize(px) {
    var spanElements = document.getElementsByTagName('span');
    for(var i = 0; i < spanElements.length; i++) {
        if(spanElements[i].className == 'foo') {
            spanElements[i].style.fontSize = px;
        }
    }
}
07-07-2007 02:22 AM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
am i blind? - by Supersonicdarky on 07-07-2007 at 01:35 AM
RE: am i blind? - by WDZ on 07-07-2007 at 01:46 AM
RE: am i blind? - by Supersonicdarky on 07-07-2007 at 01:53 AM
RE: am i blind? - by WDZ on 07-07-2007 at 02:22 AM
RE: am i blind? - by Supersonicdarky on 07-07-2007 at 02:55 AM
RE: am i blind? - by Voldemort on 07-07-2007 at 03:15 AM
RE: am i blind? - by Supersonicdarky on 07-07-2007 at 03:17 AM
RE: am i blind? - by Voldemort on 07-07-2007 at 03:24 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On