There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot bsod computer connection cpu crash css dell desktop dma driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware monitor motherboard network networking outlook outlook 2003 outlook 2007 outlook express pio problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
Xhtml transitional 1.0 help


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
Distance's Avatar
Senior Member with 306 posts.
 
Join Date: Apr 2006
07-Jun-2007, 08:06 PM #1
Xhtml transitional 1.0 help
Hey there!

I have got a small script for my forum.. and it has some xhtml errors, is there any chance someone could fix the errors for me

Place

Code:
<script type="text/javascript">
<!--

setup_memberlegend = function(tobj)
{
    prefix = ''
    suffix = ''

    if (tobj.getAttribute('clr'))
    {
        prefix += '<span style="color:' + tobj.getAttribute('clr') + ';">'
        suffix += '</span>'
    }

    if (tobj.getAttribute('bold'))
    {
        prefix += '<b>'
        suffix += '</b>'
    }

    if (tobj.getAttribute('undr'))
    {
        prefix += '<u>'
        suffix += '</u>'
    }

    if (tobj.getAttribute('ital'))
    {
        prefix += '<em>'
        suffix += '</em>'
    }

    fetch_object('memberlegend').innerHTML = prefix + tobj.getAttribute('group') + suffix
}

-->
</script>

Below <!-- what's going on box --> in FORUMHOME template.


Then in the logged in users add


Code:
<tr>
        <td class="thead">Member Legends</td>
    </tr>
    <tr>
        <td class="alt1">

        <div class="tborder" style="float:left;height:8px;width:8px;padding:2px;" group="Members" onmouseover="setup_memberlegend(this)" onmouseout="fetch_object('memberlegend').innerHTML = ''">
            <div class="tborder" style="height:8px;width:8px;background:#dce3e8;"></div>
        </div>
        <div style="float:left;">&nbsp;</div>
        <div class="tborder" style="float:left;height:8px;width:8px;padding:2px;" group="Dedicated Members" bold="y" clr="lightblue" onmouseover="setup_memberlegend(this)" onmouseout="fetch_object('memberlegend').innerHTML = ''">
            <div class="tborder" style="height:8px;width:8px;background:lightblue;"></div>
        </div>
        <div style="float:left;">&nbsp;</div>
        <div class="tborder" style="float:left;height:8px;width:8px;padding:2px;" group="Elite Members" bold="y" clr="#ffffff" onmouseover="setup_memberlegend(this)" onmouseout="fetch_object('memberlegend').innerHTML = ''">

            <div class="tborder" style="height:8px;width:8px;background:#ffffff;"></div>
        </div>
        <div style="float:left;">&nbsp;</div>
        <div class="tborder" style="float:left;height:8px;width:8px;padding:2px;" group="GZE Reviewers" bold="y" clr="#999999" onmouseover="setup_memberlegend(this)" onmouseout="fetch_object('memberlegend').innerHTML = ''">
            <div class="tborder" style="height:8px;width:8px;background:#999999;"></div>
        </div>
        <div style="float:left;">&nbsp;</div>
        <div class="tborder" style="float:left;height:8px;width:8px;padding:2px;" group="RPG Moderators" bold="y" clr="orange" onmouseover="setup_memberlegend(this)" onmouseout="fetch_object('memberlegend').innerHTML = ''">
            <div class="tborder" style="height:8px;width:8px;background:orange;"></div>

        </div>
        <div style="float:left;">&nbsp;</div>
        <div class="tborder" style="float:left;height:8px;width:8px;padding:2px;" group="Moderators" bold="y" clr="#05C23F" onmouseover="setup_memberlegend(this)" onmouseout="fetch_object('memberlegend').innerHTML = ''">
            <div class="tborder" style="height:8px;width:8px;background:#05C23F;"></div>
        </div>
        <div style="float:left;">&nbsp;</div>
        <div class="tborder" style="float:left;height:8px;width:8px;padding:2px;" group="Super Moderators" ital="y" clr="#3399cc" onmouseover="setup_memberlegend(this)" onmouseout="fetch_object('memberlegend').innerHTML = ''">
            <div class="tborder" style="height:8px;width:8px;background:#3399cc;"></div>
        </div>

        <div style="float:left;">&nbsp;</div>
        <div class="tborder" style="float:left;height:8px;width:8px;padding:2px;" group="Administrators" clr="#9966ff" bold="y" ital="y" undr="y" onmouseover="setup_memberlegend(this)" onmouseout="fetch_object('memberlegend').innerHTML = ''">
            <div class="tborder" style="height:8px;width:8px;background:#9966ff;"></div>
        </div>
        <div style="float:left;">&nbsp;</div>
        <div class="tborder" style="float:left;height:8px;width:8px;padding:2px;" group="Elite Administrators" clr="#0099FF" bold="y" onmouseover="setup_memberlegend(this)" onmouseout="fetch_object('memberlegend').innerHTML = ''">
            <div class="tborder" style="height:8px;width:8px;background:#0099FF;"></div>
        </div>
        <div style="float:left;width:10px;height:1px;">&nbsp;</div>

        <div style="float:left;" id="memberlegend"></div>
        </td>
    </tr>
Errors I get..

Quote:
Error Line 2144 column 82: there is no attribute "group".

...ht:8px;width:8px;padding:2px;" group="Members" onmouseover="setup_memberlegen
Quote:
Error Line 2148 column 107: there is no attribute "bold".

...2px;" group="Dedicated Members" bold="y" clr="lightblue" onmouseover="setup_m
Quote:
Error Line 2148 column 115: there is no attribute "clr".

...oup="Dedicated Members" bold="y" clr="lightblue" onmouseover="setup_memberleg
Quote:
Error Line 2170 column 106: there is no attribute "ital".

...:2px;" group="Super Moderators" ital="y" clr="#3399cc" onmouseover="setup_mem
Quote:
Error Line 2175 column 136: there is no attribute "undr".

...clr="#9966ff" bold="y" ital="y" undr="y" onmouseover="setup_memberlegend(this
Thanks a bunch!

Josh
__________________
My Computer Specs
Shadow2531's Avatar
Distinguished Member with 2,629 posts.
 
Join Date: Apr 2001
08-Jun-2007, 09:33 PM #2
Remove the group, bold, clr, ital and undr attributes from any elements that have them. Those attributes are not defined in the XHTML 1.0 Transitional DTD, so you can't use them if you want to pass validation.

You need to use a different solution that doesn't use those attributes.
__________________
10 ? "a line as the unending horizon"
20 ? "a curve as the rolling hillside"
30 ? "a point as a distant bird"
40 ? "a ray as the rising sun"
run
Distance's Avatar
Senior Member with 306 posts.
 
Join Date: Apr 2006
08-Jun-2007, 10:33 PM #3
I see, could you give ma an example on how I could do it then?

Thanks
Josh
Shadow2531's Avatar
Distinguished Member with 2,629 posts.
 
Join Date: Apr 2001
09-Jun-2007, 02:35 AM #4
Post a full working *example* showing how everything is supposed work. Then, someone can modify it so the attributes are not needed.
Distance's Avatar
Senior Member with 306 posts.
 
Join Date: Apr 2006
09-Jun-2007, 04:34 PM #5
http://REMOVED/ uses the same script.

Thanks
Josh Leafe

Last edited by Distance : 10-Jun-2007 07:27 AM.
Shadow2531's Avatar
Distinguished Member with 2,629 posts.
 
Join Date: Apr 2001
10-Jun-2007, 01:38 AM #6
There are a zillion ways to do that.

Attached is the first one that came to mind.
Attached Files
File Type: txt legend.txt (5.0 KB, 58 views)
Distance's Avatar
Senior Member with 306 posts.
 
Join Date: Apr 2006
10-Jun-2007, 06:56 AM #7
This Page Is Valid XHTML 1.0 Transitional!

Thanks!
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 05:57 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.