473,385 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

reserved ids?

I am having trouble (using IE6, with Windows), in using certain ids for
my html elements. id="c" works fine. So do most one-letter ids. But
id="i", and id="p", seem not to work.

I don't think I am using these identifiers for anything else. My guess
is that they are reserved. Can I find a list somewhere of reserved ids?

Nick
--
Nick Wedd ni**@maproom.co.uk
Jul 20 '05 #1
9 1471
Nick Wedd wrote:
I am having trouble (using IE6, with Windows), in using certain ids for
my html elements. id="c" works fine. So do most one-letter ids. But
id="i", and id="p", seem not to work.

I don't think I am using these identifiers for anything else. My guess
is that they are reserved. Can I find a list somewhere of reserved ids?


No ideas are reserved AFAIK.

My guess is you are trying to access them as global variables. Try following
the standards:

document.getElementById('p')

--
David Dorward http://dorward.me.uk/
Jul 20 '05 #2
VK
There are not any "reserved ids".
On the papers any id has to start with a letter and consist of letters
and numbers only.
On the practice smart guys from 3W put name (which is CDATA type) and id
in the same name space.
So browsers have to serve "the biggest possible demand", which is CDATA.
So you can assign an id="#$%^&*(" and nobody will care except
Dreamweaver and some other authoring programs (but not browsers).

So check you code through once again.

Nick Wedd <ni**@maproom.co.uk> wrote in message
news:3F**************@maproom.demon.co.uk...
I am having trouble (using IE6, with Windows), in using certain ids for my html elements. id="c" works fine. So do most one-letter ids. But id="i", and id="p", seem not to work.

I don't think I am using these identifiers for anything else. My guess is that they are reserved. Can I find a list somewhere of reserved ids?
Nick
--
Nick Wedd ni**@maproom.co.uk

Jul 20 '05 #3
In message <bm*******************@news.demon.co.uk>, David Dorward
<do*****@yahoo.com> writes
Nick Wedd wrote:
I am having trouble (using IE6, with Windows), in using certain ids for
my html elements. id="c" works fine. So do most one-letter ids. But
id="i", and id="p", seem not to work.

I don't think I am using these identifiers for anything else. My guess
is that they are reserved. Can I find a list somewhere of reserved ids?


No ideas are reserved AFAIK.

My guess is you are trying to access them as global variables. Try following
the standards:

document.getElementById('p')


That is what I am doing.
document.getElementById('a')
works. So does most other single letters.
document.getElementById('p')
does not work. The elements are similar in all respects but their name
(and position). If I swap them around, it is still the one with id 'p'
that does not work. Non-working ids that I have found are 'i', 'p',
'q'.

Nick
--
Nick Wedd ni**@maproom.co.uk
Jul 20 '05 #4
Nick Wedd <ni**@maproom.co.uk> writes:
Non-working ids that I have found are 'i', 'p', 'q'.


I have no such problem in my testing. I guess you need to show us the
page.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #5
VK wrote:
There are not any "reserved ids".
On the papers any id has to start with a letter and consist of letters ^^^^^^^^^^^^^^^^^^^ and numbers only.
[...]
So you can assign an id="#$%^&*(" and nobody will care except ^ Dreamweaver and some other authoring programs (but not browsers).
You're sure?
[...]


Please stop fullquoting and place the quote above your text, not below it.
PointedEars

Jul 20 '05 #6
Thomas 'PointedEars' Lahn <Po*********@web.de> writes:
VK wrote:

So you can assign an id="#$%^&*(" and nobody will care except
Dreamweaver and some other authoring programs (but not browsers).


You're sure?


Pretty sure. Validators will complain, because it isn't valid HTML,
but the browsers will most likely eat it. Take this example:
---
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<style type="text/css">
#\23\21 {background:yellow;}
</style>
</head>
<body>
<p id="#!">Test</p>
</body>
</html>
---
It gives yellow background in both Opera 7, Mozilla FB and IE 6.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #7
In message <pt**********@hotpop.com>, Lasse Reichstein Nielsen
<lr*@hotpop.com> writes
Nick Wedd <ni**@maproom.co.uk> writes:
Non-working ids that I have found are 'i', 'p', 'q'.


I have no such problem in my testing. I guess you need to show us the
page.


I've figured out what was going wrong here. I do have global variables
called i, p, q. These were messing up the ids of the same name. Maybe
it should have been obvious that this would happen.

Nick
--
Nick Wedd ni**@maproom.co.uk
Jul 20 '05 #8
Nick Wedd <ni**@maproom.co.uk> writes:
I've figured out what was going wrong here. I do have global
variables called i, p, q. These were messing up the ids of the same
name. Maybe it should have been obvious that this would happen.


No, it is not obvious. The Javascript global namespace and the HTML
ID namespace have no reason to be connected, and many browsers don't.

Well, in hindsight, it does feel a little obvious, as in "I should
have known this piece of crap would do something as stupid as that" :)

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #9
In message <is**********@hotpop.com>, Lasse Reichstein Nielsen
<lr*@hotpop.com> writes
Nick Wedd <ni**@maproom.co.uk> writes:
I've figured out what was going wrong here. I do have global
variables called i, p, q. These were messing up the ids of the same
name. Maybe it should have been obvious that this would happen.


No, it is not obvious. The Javascript global namespace and the HTML
ID namespace have no reason to be connected, and many browsers don't.

Well, in hindsight, it does feel a little obvious, as in "I should
have known this piece of crap would do something as stupid as that" :)


Now I find that the problem only occurs with undeclared variables. I had
thought that there was no point in declaring variables in javascript -
now I know better.

Nick
--
Nick Wedd ni**@maproom.co.uk
Jul 20 '05 #10

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

Similar topics

2
by: Matthew Cascio | last post by:
My understanding is that using reserved words as column names is allowable as long as they are quoted. I am trying to create a table dynamically with columns defined by the first row of a text...
2
by: Aravind | last post by:
Hi , This is a Windows form application which interacts with the unmanaged C++ codes . In unmanaged c++ code we allocate around 130MB on the heap for annalysing high resolution images . Earlier...
17
by: Benoit Martin | last post by:
I'm working on a project in VB.net connecting to a SQL Server 2000 database that I can't modify I created a dataset with a schema identical to the DB. When trying to update the DB from the dataset...
3
by: VK | last post by:
Just to realease my frustration: innocent "enum" is a reserved word in JScript! !@#$%^&* I occasionally discovered it just before I got ready to smash my computer over my head (some people...
31
by: metaperl | last post by:
-- python -i File "<stdin>", line 1 class = "algebra" ^ SyntaxError: invalid syntax Why isn' t the parser smart enough to see that class followed by an identifier is used for class...
6
by: Jakub Cermak | last post by:
Hi all, how can I reduce reserved memory for my process? Because according to ProcessExporer (and GC.GetTotalMemory() and taskmanager) I use about 5-6MB and reserved memory is nearly 70MB. I don't...
3
by: Robert | last post by:
I ask because, in Access help, it does not list is as such, however, I had a table with a field named 'Name'. If I put a control on a form and used this as the control source no problems, but if I...
8
by: Tim H | last post by:
I know C's rules about reserved identifiers (anything starting with "_", leading "is", etc). I don't know C++ rules. I assume the same rules and more apply? I've seen several conventions for...
4
by: Bas Wassink | last post by:
Hello all, I've been wondering about struct member names and reserved identifiers for some time now and I can't figure out whether the reserved identifier restrictions apply to struct members. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.