[thelist] Can you create tags in xhtml?

Scott Blanchard octigonuser at hotmail.com
Wed Feb 18 09:51:06 CST 2004


I have an xhtml application in which I need to append some dynamically 
generated content areas with an clickable image that will allow 
authenticated users to edit that specific content area.

Currently I am using div elements to show/hide these widgets. However, I 
need to be able to reference the collection of these widgets as a group in 
order to toggle their visibility or display property in javascript between 
'block' and 'none'. Since there will be a variable number of these widgets 
onscreen at a given time, a dynamic solution is needed.

Here's the current markup for an edit widget:

<div class="editWidget"><a href="javascript:edit(1,3)">edit widget image 
goes here</a></div>

However, I can't think of any reliable method of getting a pointer to the 
collection of divs whose class is editWidgets (from a .js file).

So, I thought that barring a solution to that problem, I could simply create 
my own tag to substitute for the div element and do a getElementsByTagname 
on that element. This is in the body of an xhtml strict doctype.

<editWidget><a href="javascript:edit(1,3)">edit widget image goes 
here</a></editWidget>

However, this seems to work fine in IE, but not in Moz. Any suggestions 
would be greatly appreciated.

_________________________________________________________________
Say “good-bye” to spam, viruses and pop-ups with MSN Premium -- free trial 
offer! http://click.atdmt.com/AVE/go/onm00200359ave/direct/01/



More information about the thelist mailing list