469,346 Members | 6,518 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,346 developers. It's quick & easy.

IE7 and myXML.getElementsByTagName('myTag').length

I'm having a quiet big problem with ie7 [what a surprise.....].
I've made a search engine with AJAX implementations, and some XML....
It works fine under Firefox... but my Dear IE cry about an object
which doesn't support a method.

Here's a part of my code:

function showPrest(begin) {
debug = document.getElementById('debug');
tmp = myXML.getElementsByTagName('prestataire'); // HERE IS THE
xmlLn = tmp.length;
buttonN = '<span style="color:1b39a7;text-decoration:none;">suivant</
begin = parseInt(begin);
if(begin+10<xmlLn) {
if(begin != 0) end = begin + 10;
buttonN = '<span style="color:1b39a7;text-
decoration:underline;cursor:pointer;" onclick="showPrest(\''+end
+'\')">suivant</span>'; // bouton suivant

} else { // si la longeur de begin+10>xmlLn, on s'arrete a xmlLn
end = xmlLn;
buttonP = '<span style="color:1b39a7;text-
if(begin !=0) {
buttonP = '<span style="color:1b39a7;text-
decoration:underline;cursor:pointer;"onclick="show Prest(\''+

nb = Math.round(xmlLn/10);
list = '';
for(i=0;i<nb;i++) {
if(begin == 10*i)
list += '<span style="color:1b39a7;text-
list += '<span style="color:1b39a7;text-
decoration:underline;cursor:pointer;" onclick="showPrest(\''+
for(i=begin;i<end;i++) {
prest = myXML.getElementsByTagName('prestataire')[i];
out += '<tr>';
out += '<tr><td colspan="5" style="text-align:right">'+buttonP+' |
'+list+'| '+buttonN+'</td></tr>';
out += '</table>';
document.getElementById('showResult').innerHTML = out;
if(expend) {
So, IE complains about my line tmp =
myXML.getElementsByTagName('prestataire'); , saying
"Line 16, char 3, this object doesn't manage this property or method,
code 0"
great... which object? which property/method?
My xml is correct and can be see here :
and search engine here :

If anyone has a solution....

Thanks in advance!



Mar 2 '07 #1
1 1731
I've found a hint:
"myXML" is declared as a global var outside my functions.... it's
empty at the begining, then a function fill it with datas.... and call
the one I show up earlier.....
->IE doesn't support it, as I can see.... great, have to recode all
for this.... this.... well, there are no words to define it :/

if someone has another answer/solution [other than "do not use
IE"..... ^^' ]



Mar 2 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

23 posts views Thread by Michel Bany | last post: by
3 posts views Thread by Q1tum | last post: by
5 posts views Thread by Moses | last post: by
2 posts views Thread by =?Utf-8?B?cm9kY2hhcg==?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.