Closed
Bug 178508
Opened 23 years ago
Closed 21 years ago
alert(); in my js-sourcecode shows no effect;
Categories
(Core :: DOM: HTML Parser, defect)
Core
DOM: HTML Parser
Tracking
()
RESOLVED
INVALID
People
(Reporter: deirdre_skye, Assigned: harishd)
Details
(Whiteboard: INVALID?)
Attachments
(1 file)
|
6.04 KB,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2b) Gecko/20021027
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2b) Gecko/20021027
i've tried in many kombinations,
<body onload="">
an in <script> tags in severall places
nowhere i get an simple alert-box
Reproducible: Always
Steps to Reproduce:
1.type alert(); in my html-js code
2.run the page
3.
Actual Results:
evrethings fine except alert and soem of my own js functions does not work
Expected Results:
RUN THESE FUNC
Comment 1•23 years ago
|
||
Are you blocking unrequested popups?
| Reporter | ||
Comment 2•23 years ago
|
||
function baueTabelle()
{
var i, j = -1, td = document, t = td.getElementById("EU").firstChild;
while (etab[++j])
{
//
//------this is the dateline----------
//
var z = t.appendChild(document.createElement("tr") );
z.attributes.bgColor.nodeValue = efarben[j];
before this appenchild i can run some of my procedures,
after that not
thanks boris but i admited my script everything
Comment 3•23 years ago
|
||
> t = td.getElementById("EU").firstChild
t is a textNode, so you get a JS error when trying to append things to it
(looking at the JS console in cases like this could be helpful in debugging).
*** This bug has been marked as a duplicate of 26179 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Comment 4•23 years ago
|
||
The other bug is somewhat inscrutable to me, but I will take Boris'
word for it that this report is a duplicate! Marking Verified -
Note the JS Console (to view error messages) is available in Mozilla at
Tools > Web Development > JavaScript Console
There is also a JS Debugger (to step through code line-by-line)
Tools > Web Development > JavaScript Debugger
Status: RESOLVED → VERIFIED
| Reporter | ||
Comment 5•23 years ago
|
||
hej guys you are really quick !!
js console says: Error: t has no properties
t is an table - body - node
and to the 26179 querry:
yes i have an internal ie running (in my htmleditor)
but frome theres is no effect
Comment 6•23 years ago
|
||
reopening per comment 5... textnodes certainly have properties. ;)
Status: VERIFIED → UNCONFIRMED
Resolution: DUPLICATE → ---
| Reporter | ||
Comment 7•23 years ago
|
||
if you pleased me so nice *g*
this website is abou spiritual things an in german
and i deleted some tags that dont belong to th problem.(with some more spiritual
problems*g*)
the site shoes an cs-dom generated table that is in the left of an 2*1 outer
table. alle td's of that inner table contain links. klicking them you get
a comment on the right td of the outer table.
&1 comment for my own: sometimes my own dom-inspektor is more usefull than yours
it is an js-script that works well but has still not the features i planned
if you want i can send you later
here's the source. only for you boris..
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html><head>
<title> hbg - elemente - sketch</title>
<meta name="author" content="Lichtkind">
<meta name="generator" content="Ulli Meybohms HTML EDITOR">
</head>
<script language="JavaScript"> <!--
efarben = new Array('#BBBBBB','#ee5555','#33cc33','#7777ff','#ffa000','#ffffff');
etab = new Array(
new Array(' ','S','Name','Bedeutung','Waffe','Richtung','Farbe','Körper'),
new Array('1','.feuer','Feuer','Wille','Stab','Nord','rot','Tetraeder'),
new Array('2','.wasser','Wasser','Gefühl','Kelch','Süd','grün','Ikosaeder'),
new Array('3','.luft','Luft','Gedanke','Schwert','Ost','blau','Oktaeder '),
new Array('4','.erde','Erde','Materie','Schild','West','gelb','Hexaeder'),
new Array('5','O','Geist','Liebe','Lampe','Mitte','weiß','Dodekaeder'));
elcomment = new Array(
new Array(new Array('- Elemente sind Gedankenkonstrukte, eine Einteilung.',
'- sind Teilaspekte die das Verstehen des Ganzen
erleichtern.',
'- sind ein sehr einfaches und deshalb mächtiges System',
'- die Macht entspringt der universellen
Anwendbarkeit',' '),
new Array('- die Symbole entstammen der magischen Formelsprache.',
'- sie weisen auf das wirken der Kräfte untereinander
hin.',' ',' ',' '),
new Array('- die Namen knüpfen an sinnliche Erfahrungen.',
'- vermitteln den grundcharkter der elemente.',' ','
',' '),
new Array(' ',' ',' ',' ',' '),
new Array(' ',' ',' ',' ',' '),
new Array(' ',' ',' ',' ',' '),
new Array(' ',' ',' ',' ',' '),
new Array('- die regelmässigen Körper repräsentieren die Elemente
in 3D.',
'- die Flächen dieser sogenannten platonischen Körper
sind gleich.',
'- heisst auch das alle Winkel der Flächen zueinander
gleich sind.',' ',' ')),
new Array(new Array(' ',' ',' ',' ',' '),
new Array(' ',' ',' ',' ',' '),
new Array('- ich bin, ich will,',' ',' ',' ',' '),
new Array(' ',' ',' ',' ',' '),
new Array(' ',' ',' ',' ',' '),
new Array(' ',' ',' ',' ',' '),
new Array(' ',' ',' ',' ',' '),
new Array(' ',' ',' ',' ',' ')),
new Array(new Array(' ',' ',' ',' ',' '),
new Array(' ',' ',' ',' ',' '),
new Array(' - ich fühle, es ist ',' ',' ',' ',' '),
new Array(' ',' ',' ',' ',' '),
new Array(' ',' ',' ',' ',' '),
new Array(' ',' ',' ',' ',' '),
new Array(' ',' ',' ',' ',' '),
new Array(' ',' ',' ',' ',' ')),
new Array(new Array(' ',' ',' ',' ',' '),
new Array(' ',' ',' ',' ',' '),
new Array(' ',' ',' ',' ',' '),
new Array(' ',' ',' ',' ',' '),
new Array(' ',' ',' ',' ',' '),
new Array(' ',' ',' ',' ',' '),
new Array(' ',' ',' ',' ',' '),
new Array(' ',' ',' ',' ',' ')),
new Array(new Array(' ',' ',' ',' ',' '),
new Array(' ',' ',' ',' ',' '),
new Array(' ',' ',' ',' ',' '),
new Array(' ',' ',' ',' ',' '),
new Array(' ',' ',' ',' ',' '),
new Array(' ',' ',' ',' ',' '),
new Array(' ',' ',' ',' ',' '),
new Array('- der Hexaeder, auch Würfel genannt, müsst bekannt
sein.',' ',' ',' ',' ')),
new Array(new Array(' ',' ',' ',' ',' '),
new Array(' ',' ',' ',' ',' '),
new Array(' ',' ',' ',' ',' '),
new Array('- Liebe ist Energie die in der Herzgegend fühlbar ist.',
'- die zur Aufgabe egoistischer Ziele verleitet.',
'- die immer das Leben bejaht und harmonisierend
wirkt.',' ',' '),
new Array('- Licht=Erkenntnis, nur in Liebe erlangt man echtes
Versämdnis.',
'- göttliches Licht erhellt unser gesamtes
Bewusstsein.',' ',' ',' '),
new Array(' ',' ',' ',' ',' '),
new Array('- weiß ist die Vereinigung aller Farben des regenbogens.',
'- zeigt an das jetzt alles sichtbar ist und
harmonisiert.',' ',' ',' '),
new Array(' ',' ',' ',' ',' ')));
function baueTabelle()
{
var i, j = -1, td = document, t = td.getElementById("EU").firstChild;
while (etab[++j])
{
var z = t.appendChild(document.createElement("tr") );
z.attributes.bgColor.nodeValue = efarben[j];
i = -1;
while (etab[j][++i])
{
var d = z.appendChild(td.createElement("td") );
text = d.appendChild(td.createTextNode(" "));
var a = d.appendChild(td.createElement("a") );
a.attributes.href.nodeValue = "javascript:tauscheKommentar("+i+","+j+")";
if (etab[j][i].substring(0,1)=='.'){
var bild = a.appendChild(td.createElement("img"));
bild.attributes.src.nodeValue =
etab[j][i].substring(1,etab[j][i].length)+'.gif';
bild.attributes.border.nodeValue = 0;
}
else a.appendChild(td.createTextNode(etab[j][i]));
}
}
}
function tauscheKommentar(x,y)
{
var i=-1, k = document.getElementById("textfenster");
k.attributes.bgColor.nodeValue = efarben[y];
while (k.hasChildNodes()) { k.removeChild(k.firstChild); }
while (elcomment[y][x][++i])
{
k.appendChild(document.createTextNode(elcomment[y][x][i]));
k.appendChild(document.createElement("br") );
}
}
//-->
</script>
<body link=#000000
vlink=#000000
alink=#770000
bgcolor=#8888ff>
<div align="center"><b><a
href="javascript:tauscheKommentar(0,0)">ELEMENTE</a></b></div>
<br><br>
<table border=2 bordercolor="#222222" align=center>
<tr>
<td><table bordercolor="#222222" border=0 Id='EU' ></table></td>
<td bgcolor=#BBBBBB id="textfenster"></td>
</tr>
</table>
<script language="JavaScript">
<!--
tauscheKommentar(0,0);
baueTabelle();
//-->
</script>
</body>
</html>
Comment 8•23 years ago
|
||
Comment 9•23 years ago
|
||
> t = td.getElementById("EU").firstChild
Why would there be a firstChild? There isn't any in the source...
Over to parser, but I don't think we want to create a tbody if we're not forced
to by the DTD. And this code would do better to use insertRow() on the table
instead of depending the on the tbody node being present...
Assignee: rogerl → harishd
Status: UNCONFIRMED → NEW
Component: JavaScript Engine → Parser
Ever confirmed: true
OS: Windows XP → All
QA Contact: pschwartau → moied
Hardware: PC → All
Whiteboard: INVALID?
| Reporter | ||
Comment 10•23 years ago
|
||
I've shamed, you must not debugging my code
i'm added some useless stuff to guarantee that an table body is(now is source)
js konsole still mocks:
Error: z.attributes.bgColor has no properties
Source File: file:///.............skizze.html
Line: 86
sorry but insertRow() is'nt documented here
where can i read that?
i saw nothing at w3c to js
thanks
Comment 11•23 years ago
|
||
> z.attributes.bgColor
This ".attributes" thing is an IE-only extension... it will not work in Mozilla.
Try using setAttribute() instead.
> where can i read that?
http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-64060425
Comment 12•21 years ago
|
||
No Mozilla bug here as far as I can tell...
-> INVALID
Comment 13•21 years ago
|
||
Yep.
Please do not reopen this bug. File separate bugs on separate problems.
Status: NEW → RESOLVED
Closed: 23 years ago → 21 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•