473,503 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to use TreeMap, TreeSet, etc?

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

Thanks,
mark
Jul 20 '05 #1
1 8470
Mark Wayne wrote:
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 <gw*****@agricoreunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_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-deve...upgrade_2.html
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5129
by: a | last post by:
I have the following problem, where the Song is a class created by me. The first add is ok. The second caused this error. Exception in thread "main" java.lang.ClassCastException: library.Song...
1
1915
by: treeman | last post by:
I copied the example Compile is successful .net 2003 but i press button , nothing to show but the example has box show up, why ? where 's wrong?
0
2055
by: Treeman | last post by:
I copied the example Compile is successful .net 2003 but i press button , nothing to show but the example has box show up, why ? where 's wrong?
0
2050
by: Thiero | last post by:
I am a studend in programming and I find it difficult to use treemap, can any one help me on how to use treemap. Specially the purpose is to use treemap and give a list of students firstname...
1
29261
by: Matt | last post by:
I have to believe I'm not the first person to have this question. However, I'm not having any luck finding an answer. I'm using Java 1.5. Say I have the following: Set<Stringa = new...
4
3008
by: dineshchothe | last post by:
I am developing one application in java(swing) font converter. In which I have to upload .doc file .Then if that file contains marathi,english text then I want to change marathi font to unicode.My...
3
2876
by: millz | last post by:
I am trying to create a tree map within a TreeMap. Any help would be great. goes a bit like this: public class ChessImpl implements CHESS { private Map<String, Integer> name; ...
7
3414
by: tomshorts07 | last post by:
hi everyone! i was wondering if anyone had any ideas on how to go about coding a method that would determine the median of a list of numbers just to clarify- a median is the 'middle value' when...
1
6816
by: nvinhphu | last post by:
Hello everybody, Is there any STL-based data structure that is equivalent to Java::TreeSet? Thank you very much. Phu
0
7087
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7281
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7462
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5579
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3156
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
383
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.