Click here to Skip to main content
15,888,062 members
Articles / Programming Languages / Javascript

JScript Tree List Control v3.0

Rate me:
Please Sign up or sign in to vote.
4.88/5 (67 votes)
6 Dec 20024 min read 309K   5.2K   89  
Completely rewritten and much more versatile than my two previous tree list controls, this version includes dynamic branch loading, user-specifiable tree column, and more!
<?xml version="1.0" encoding="iso-8859-1"?>
<tree>
	<node showchildren="yes">
		<columntext><![CDATA[]]></columntext>
		<columntext><![CDATA[<input type="checkbox">]]></columntext>
		<columntext><![CDATA[6]]></columntext>
		<columntext><![CDATA[5]]></columntext>
		<columntext><![CDATA[4]]></columntext>
		<children>
			<node refkey="" iconsrc="" xmlsrc="" showchildren="yes" onclick="">
				<columntext><![CDATA[]]></columntext>
				<columntext><![CDATA[<input type="checkbox">]]></columntext>
				<columntext><![CDATA[E]]></columntext>
				<columntext><![CDATA[R]]></columntext>
				<columntext><![CDATA[T]]></columntext>
				<children />
			</node>
			<node refkey="" iconsrc="" xmlsrc="http://top01wdt1:8090/workspace/test.xml" showchildren="no" onclick="">
				<columntext><![CDATA[]]></columntext>
				<columntext><![CDATA[<input type="checkbox">]]></columntext>
				<columntext><![CDATA[I]]></columntext>
				<columntext><![CDATA[O]]></columntext>
				<columntext><![CDATA[P]]></columntext>
				<children />
			</node>
		</children>
	</node>
	<node refkey="" iconsrc="" xmlsrc="" showchildren="yes" onclick="alert(this.innerHTML);">
		<columntext><![CDATA[]]></columntext>
		<columntext><![CDATA[<input type="checkbox">]]></columntext>
		<columntext><![CDATA[e]]></columntext>
		<columntext><![CDATA[r]]></columntext>
		<columntext><![CDATA[t]]></columntext>
		<children>
			<node refkey="" iconsrc="http://top01wdt1:8090/web_api/images/icons/icon_user.gif" xmlsrc="test.xml" showchildren="no" onclick="">
				<columntext><![CDATA[]]></columntext>
				<columntext><![CDATA[<input type="checkbox">]]></columntext>
				<columntext><![CDATA[h]]></columntext>
				<columntext><![CDATA[j]]></columntext>
				<columntext><![CDATA[k]]></columntext>
				<children />
			</node>
		</children>
	</node>
</tree>
			

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
Australia Australia
Web application developer, graphic designer, aspiring entrepreneur, snowboarder and electronic music afficianado.


Comments and Discussions