473,569 Members | 2,601 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

unique number for each object?

Hi,

Is there an internally assigned number for each JavaScript object that
I can read? If so how would I do that?

Thanks,
Peter

Jun 12 '06 #1
3 2847
petermich...@gm ail.com wrote:
Is there an internally assigned number for each JavaScript object
that I can read? ...


No. If you want unique identifiers for JS objects you have to create
them yourself (and it is useful to think about how unique they need to
be before you start).

Richard.

Jun 12 '06 #2


pe**********@gm ail.com wrote:
Is there an internally assigned number for each JavaScript object that
I can read? If so how would I do that?


There is no hash code which some other languages provide.
IE/Win gives you a generated id on each element node in the DOM, see
<http://msdn.microsoft. com/library/default.asp?url =/workshop/author/dhtml/reference/properties/uniqueid.asp>
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jun 12 '06 #3

Richard Cornford wrote:
petermich...@gm ail.com wrote:
Is there an internally assigned number for each JavaScript object
that I can read? ...


No. If you want unique identifiers for JS objects you have to create
them yourself (and it is useful to think about how unique they need to
be before you start).

Thanks Richard,

What unexpected considerations need to be made when making a unique id?
I am currently using a prefix and a counter together as a string for
the identifier. The counter increments each time a constructor makes a
new object.

Peter

Jun 12 '06 #4

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

Similar topics

7
2384
by: Tony Clarke | last post by:
Hi, I'm trying to write a system thats used for about 50 clients that uses html forms and php to log details. The problem is that when a client loads the form page it's given a value which is the last record in a table +1 (i.e. so its the next record). The problem with that is that a client could sit on that page for 20 mins (or whatever...
4
10734
by: August1 | last post by:
A handful of articles have been posted requesting information on how to use these functions in addition to the time() function as the seed to generate unique groups (sets) of numbers - each group consisting of 6 numbers - with a total of 50 groups of numbers. A well-known girl that some publishing companies use to provide introductory level...
10
18563
by: Mamuninfo | last post by:
Hello, Have any function in the DB2 database that can generate unique id for each string like oracle, mysql,sybase,sqlserver database. In mysql:- select md5(concat_ws("Row name")) from tablename; Here this function generate unique id for each row of the table. Regards..
7
6653
by: Brian Keating | last post by:
Hi there, Is it possible to add a unique constraint on two columns in a table, so that the constraint is a composite of the two? i.e. these two columns together should be unique...? i.e. column1 column2 1 1 1 2
1
6305
by: Danny Liberty | last post by:
I need some opionions on an issue here... Suppose I want to keep a collection of objects, each need to be uniquely identified by a number. This number has no meaning as long as it's unique, so it should be automatically generated for each new object. One more requirement is keeping the objects in the order in which they were inserted, not...
4
3815
Ispep
by: Ispep | last post by:
Hi, unfortunately having a bit of difficulty with a question from an Open University course I'm currently doing. If you could help me out in any way I'd be grafeul (though obviously it goes without saying I'm not asking you to solve the question - that won't help come exam time :(). Anyway I have a CSV delimited file in the following format; ...
8
7194
by: Marc | last post by:
Hi all, I have to generate and send to a printer many 6 digit alphanumeric strings. they have to be unique but I cannot check in a database or something like that if it have already been printed. the string has also to seem a random one and it cannot have an apparence of a sequence. My first approach is to do it with a decimal counter and...
3
1707
by: deaddog4201 | last post by:
How can i save a .txt file where the name of the file would be the result of the selection made from a Dom tree view's parent node tag in visual basic? So for example i have an editable tree view form i add an entry to the tree view when i save it another process is started "part of which is an encryption scheme" the important part i need help...
0
7701
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...
0
7615
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7677
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...
1
5514
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3643
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2115
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
1
1223
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.