Ajax自动收报机新闻源 [英] Ajax ticker news feed

查看:74
本文介绍了Ajax自动收报机新闻源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个由js自动收录器组成的新闻源,它使用php抓取来转换rss源并在html页面中显示但是我有一个错误....


MyElement.getElimentsByTagName(命名)[0] .firstChild为空


如果我点击确定它会消失并且自动收报机工作正常。


有谁能帮我纠正错误?



I have a newsfeed which is made up of a js ticker that uses a php grab to convert an rss feed and show it in a html page but I have an error ....

MyElement.getElimentsByTagName(naming)[0].firstChild is null

If I click ok it goes away and the ticker works fine.

Can anyone help me correct the error?

附加图片
错误1.jpg (14.2 KB,973次观看次数)
Attached Images
error 1.jpg (14.2 KB, 973 views)

推荐答案

没有看到代码就会猜到答案......基本上:


首先我假设:
without seeing the code it would be guesswork to give an answer ... basically:

first i assume that:
展开 | 选择 | Wrap | 行号




这里是js代码,如果它有帮助

Hi
here is the js code if it helps

展开 | 选择 | Wrap | 行号


,因为您可能会看到错误可能来自第62,63或64行之一,其中 getChildNode() - 方法被称为。因为在XMLHttpRequest的结果上调用了这个方法,我怀疑响应可能会错过一个项目的子节点,或者某个地方有一个损坏的节点......所以:

so as you might see the error probably comes from one of the lines 62, 63 or 64 where the getChildNode()-method is called. since this method is called on the result of the XMLHttpRequest i suspect that the response might miss an item''s subnode or that there is a corrupt node somewhere ... so that:

展开 | 选择 | Wrap | 行号


这篇关于Ajax自动收报机新闻源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆