473,657 Members | 2,478 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 8482
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*****@agrico reunited.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
5143
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 at java.util.TreeMap.compare(Unknown Source) at java.util.TreeMap.put(Unknown Source) at java.util.TreeSet.add(Unknown Source) at library.Album.main(Album.java:82)
1
1921
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
2067
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
2059
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 lastnname and matriculation after sorting them by last name. I did the sorting already using the collections framework, now my problem is how to use the treemap so that i would get the list.
1
29273
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 HashSet<String>(); Map<String, Objectb = new TreeMap<String, Object>(); Assume somewhere these are populated.
4
3018
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 converter program is completed.Now problem is that how I get marathi font or any other non unicode font from file whcih I want to unicode? Thanks in advance. Dinesh
3
2941
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; private int membernumber; private Map<String, Map<Integer, Holding>> stock;
7
3425
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 all of the numbers are placed in increasing order; for example- the median of 3 6 12 40 41 57 58 90 is 40.5 i was thinking about using a method that sorts the list in increasing order, then determining if there is an even or odd number of...
1
6831
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
8420
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8740
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8516
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8617
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7353
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4173
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2743
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1733
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.