How to use TreeMap, TreeSet, etc?

M

Mark Wayne

Is is possible to use TreeMap in the javascript <SCRIPT> portion of HTML? If
so, how?

Thanks,
mark
 
G

Grant Wagner

Mark said:
Is is possible to use TreeMap in the javascript <SCRIPT> portion of HTML? If
so, how?

Thanks,
mark

The only way to use a TreeMap object would be to have a Java Applet in your page
and use LiveConnect to transfer data between JavaScript and the Java Applet. It
would be slow, inefficient and would probably fail in far more browsers then
just using JavaScript by itself.

That said, why do you need to use a TreeMap in JavaScript? JavaScript has
associative arrays, and all the functionality of a Java TreeMap could be
accomplished in JavaScript if you so desired, although I doubt you'd use all the
functionality available.

What problem are you trying to solve? Do you really require the keys to be
sorted?

--
| Grant Wagner <[email protected]>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/author/dhtml/reference/dhtml_reference_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 6/7 and Mozilla
* http://www.mozilla.org/docs/web-developer/upgrade_2.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top