Ask a Question related to Macromedia Dynamic HTML, Design and Development.
-
wutnickel webforumsuser@macromedia.com #1
getElemntsByTagName in IE 5.x
Hi! Does anybody know if IE 5 and 5.5 have Problems with "getElemntsByTagName"?
I have this line in my parent-document:
Header.document.getElementsByName("header_text")[0].attributes.value.value=Content.document.getElemen tsByTagName("form")[0].attributes.name.value;
I want to get the value of the name in another document:
<form action="" name="xyz">
It works under IE 6 but doesn't under IE5; IE5.5 and OPERA.
Please help me!
Thanks in advance, Alex
wutnickel webforumsuser@macromedia.com Guest
-
Dan-CFTagStore.com #2
Re: getElemntsByTagName in IE 5.x
Hi,
You have 2 values in the snippet below:
".....attributes.value.value=Content.document..... ......"
also, try using getAttribute function instead of referring to the attributes collection.
You can also just say:
content.document.forms(0).name
AFAIK, getElementByTagName requires CAPITALS, so:
getElementsByTagName("form") becomes getElementsByTagName("FORM")
but because its a form object, you dont need to pull it out of the DOM using getElementsByTagName
I personally always use getElementById and assign an ID to any element.
Hope that helps,
Regards,
Dan.
Check Out : [url]www.cftagstore.com[/url] for the latest and greatest Coldfusion custom tags and components!
Built by developers, for developers!
Dan-CFTagStore.com Guest
-
wutnickel webforumsuser@macromedia.com #3
Re: getElemntsByTagName in IE 5.x
Thank you! I also use ID now. This works! Another problem form IE5.x to IE6 was that I always used:
..attributes.xyz.value
Now I changed everytinh to just: .xyz
Now bot IE 6 and 5.x can interpret it!
Thanks so far, Alex
wutnickel webforumsuser@macromedia.com Guest



Reply With Quote

