Karl Blessing
Programmer
this is an old, but revisited problem, currently the the IE version works just fine when selecting, but not the netscape.
(I use ASP, which returns different javascript routines for IE and NS, so that the Document Object Model isnt messed up)
this is the javascript sniplet for netscape
(currently commented out as it does not work)
What I have is a simulated tree of checkboxes and radios, that form a hiarchy, in a javascript array (created from a server-side vb array) which keeps track of the Parent child relationships.
As far as I can tell that part of it works fine in both NS and IE as, the tree is formed and so forth, the problem lies in the referencing of the object
The Root parents have Numbers as names
1,2,3,4,5 so forth, main parents are numeric, as their children start with those main numbers, but have characters in them, such as 5_1 or 5-6.
In IE, referencing to the "5" works fine, but in NS , it thinks I want to reference the 5th object on the page (which is much further away than "5" so the parent validation never works in NS.
Does anyone know of a way where I can force NS to use "5" as a name, and not as an ordinal to it's numeric sequence.
Or better yet, how can I figure out which # that particular parent is, so if I detect netscape , I Could create an array to find the index for a name (might be more work, but if it'll work, then I'd want to do it)
Thanks in Advance
Karl
kb244@kb244.com
Experienced in : C++(both VC++ and Borland),VB1(dos) thru VB6, Delphi 3 pro, HTML, Visual InterDev 6(ASP(WebProgramming/Vbscript)
(I use ASP, which returns different javascript routines for IE and NS, so that the Document Object Model isnt messed up)
this is the javascript sniplet for netscape
(currently commented out as it does not work)
Code:
/*
if (document.forms[0][tree[j][2]].length > 1) // if multiple control w/ same name
{
for (i=0; i<document.forms[0][tree[j][2]].length; i++) //loop through each
{
var str1 = document.forms[0][tree[j][2]].label;
var str2 = tree[j][5];
if (str1.toLowerCase() == str2.toLowerCase())
{ //if current control matches the label for the "True" parent
document.forms[0][tree[j][2]][i].checked = true;
}
}
}
else //if there is only one control with that name
{
document.forms[0][tree[j][2]].checked = true;
}
*/
What I have is a simulated tree of checkboxes and radios, that form a hiarchy, in a javascript array (created from a server-side vb array) which keeps track of the Parent child relationships.
As far as I can tell that part of it works fine in both NS and IE as, the tree is formed and so forth, the problem lies in the referencing of the object
The Root parents have Numbers as names
1,2,3,4,5 so forth, main parents are numeric, as their children start with those main numbers, but have characters in them, such as 5_1 or 5-6.
In IE, referencing to the "5" works fine, but in NS , it thinks I want to reference the 5th object on the page (which is much further away than "5" so the parent validation never works in NS.
Does anyone know of a way where I can force NS to use "5" as a name, and not as an ordinal to it's numeric sequence.
Or better yet, how can I figure out which # that particular parent is, so if I detect netscape , I Could create an array to find the index for a name (might be more work, but if it'll work, then I'd want to do it)
Thanks in Advance
Karl
kb244@kb244.com
Experienced in : C++(both VC++ and Borland),VB1(dos) thru VB6, Delphi 3 pro, HTML, Visual InterDev 6(ASP(WebProgramming/Vbscript)