473,407 Members | 2,546 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Error message on a js newsfeed

danielm60
Hi

I'm trying to use a free RSS news feed in my webpage and it works like a charm but throws up an error message on the first load:

myElement.getElementsByTagName(naming)[0].firstChild is null

In firefox error console the message is :

Error: document.getElementById("TICKER") is null
Source File: http://www.xxxxxx.com/js/webticker_lib.js Line: 5

But in line 5 of the webticker_lib.js is the statement :

05 TICKER_CONTENT = document.getElementById("TICKER").innerHTML;

It also come up with another error within the page:

Error: st is undefined
Source File: http://www.xxxxxx.com/js/ticker.js Line: 103

But again in the js it is :

Line: 103

103 if ( itemLen > st.length ) {
storyCount++;
if ( storyCount >= rssItems.length ) {
storyCount = 0;


Can someone help please

Thanks
Daniel
Apr 20 '10 #1
13 1613
jkmyoung
2,057 Expert 2GB
Do you actually have an element with an id attribute of "TICKER"? in your feed?

You haven't defined st? What is this st you speak of?
Apr 20 '10 #2
Hi
Yes the id TICKER is used in the html

And I really don't know what the st is but thats the error message that comes up in the error console I can only presume it refers to the string length of the news story !
Apr 20 '10 #3
Any luck yet?
Anyone ?
Apr 21 '10 #4
jkmyoung
2,057 Expert 2GB
I thought you solved it when you said:
"And I really don't know what the st is but thats the error message that comes up in the error console I can only presume it refers to the string length of the news story ! "

st is either a typo, or a variable that isn't set properly.
Apr 21 '10 #5
No still showing
Error: st is undefined
Source File: http://www.xxxxxx.com/js/ticker.js Line: 103




103 if ( itemLen > st.length ) {
storyCount++;
if ( storyCount >= rssItems.length ) {
storyCount = 0;
Apr 21 '10 #6
and error

myElement.getElementsByTagName(naming)[0].firstChild is null

In firefox error console the message is :

Error: document.getElementById("TICKER") is null
Source File: http://www.xxxxxx.com/js/webticker_lib.js Line: 5
Apr 21 '10 #7
jkmyoung
2,057 Expert 2GB
EXACTLY! Define st. Yes, YOU, danielm60.

There's no context as to what itemLen is. For all we know, you might be able to just take it out.
Apr 21 '10 #8
Ok but what about the first error ?
Apr 21 '10 #9
jkmyoung
2,057 Expert 2GB
Post a link to your feed. You're certain you have an element like:
<someElement id="TICKER">
?

It is case sensitive.
Apr 21 '10 #10
Hi
Yes the element TICKER is def defined in the right case but it was a freebie so ...

Anyway thanks for your help and here is the link
http://www.ukvine.com/jg/contact.html
Apr 22 '10 #11
jkmyoung
2,057 Expert 2GB
Do you have control over the html or the js?

You haven't added the ticker to the html that the webticker is to be used for.
You haven't specified a proper rss feed to be used.
Apr 22 '10 #12
Hi

err yes I have ... as I said it already works so if it didn't .. it wouldn't work.

It calls it from the webticker_lib.js which in turn uses grab.php to retrieve the feed.
Sorry I must be in the wrong site. I thought if I gave you an error code you could simply point me in the right direction of a fix.

Don't worry I'll go and find another site.
Apr 22 '10 #13
jkmyoung
2,057 Expert 2GB
Putting in the js doesn't put in the xml elements into your html.

You've put in one part, the overlying functions, but completely neglected to put in the structures with which it works with. I don't know how to make this any more clear.

Your html is missing essential parts for the js to work. It's like telling a function:
"Go increment the web counter", but then never putting a web counter on your page.
The function then goes, "uhhh... what web counter?"

In your case, you're saying "Go read the RSS feed!" and the function is telling you, "But boss, there is NO RSS feed!"

Good luck with your code.
Apr 22 '10 #14

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: afreema | last post by:
We have a WebSphere application that quit working this week. It was trying to hit DB2 UDB Version 8 on Linux. The Driver is DB2 V7. This is the message in the WebSphere logs. Does anyone know...
8
by: Steve | last post by:
I have several pairs of synchronized subforms in an application. I have a Delete button for each pair that uses the following code or similar to delete a record in the second subform: ...
3
by: Rolan | last post by:
I seem to be unable to have a custom error message to appear for Error 10011 (database was unable to append all the data to the table). Each time, the MS Access default error message box appears....
7
by: Leon Shaw | last post by:
Someone please help me understand the following error message: Server Error in '/solo' Application. ---------------------------------------------------------------------------- ---- ...
1
by: Steve Grahovac | last post by:
I have been having trouble the last few days opening any ASP.NET web forms in the design view in the designer. Every time I clicked on an aspx file I got a message box with the error "Unable to...
3
by: Robert | last post by:
Every time I navigate to any .aspx file on my computer, I get the error below. According to MSDN this indicates that my CLR is corrupt, but I've re-installed the .NET framework with no help. Also...
9
by: JTrigger | last post by:
When I compile my project using the IDE on a development machine it works just fine. When I compile it on the server using csc.exe, I get the following error when I try to bring it up in the web...
8
by: Rod | last post by:
I have been working with ASP.NET 1.1 for quite a while now. For some reason, opening some ASP.NET applications we wrote is producing the following error message: "The Web server reported...
5
by: Bruce Schechter | last post by:
I just started to develop an ASP.NET application in vs.net 2003 . But each time I try to execute the application (which is basically empty so far), I get a dialog box titled "Microsoft Development...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.