472,779 Members | 2,524 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Error: VBScript runtime (0x800A01A8) Object required: '[object]'

Hi,

I'm trying to amend an intranet .asp page but keep getting this error.
The error only occurs when I pull the WHOLE intranet off the server
and try to run it locally. The error isn't there when the page is run
off the intranet server.

I'm using IIS 5, I.E. 6 and WinXP Pro.

Here's the code it doesn't like:

<%
cookieUsrUID = 0
'response.cookies("cookiePassCode") = 0
cookieUsrUID = request.cookies("cookieUsrUID")

' Get the URL for the RSS file first from the form, then from the
Cookie
RSS_URL = Request.Form("headlineURL")
If RSS_URL = "" Then
RSS_URL = Request.Cookies( "headlineURL" )
Else
Response.Cookies( "headlineURL" ) = RSS_URL
Response.Cookies( "headlineURL" ).Expires = "Dec 31, 2010"
End If
If RSS_URL = "" Then
' If it has not been defined, default it to the BBC front
page
RSS_URL = "http://news.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss091.xml"
Response.Cookies( "headlineURL" ) = RSS_URL
Response.Cookies( "headlineURL" ).Expires = "Dec 31, 2010"
End If

%>

<!-- BLAH BLAH BLAH -->

<%
Set rssData = Server.CreateObject("MSXML2.DomDocument.4.0")
rssData.async = False
rssData.Load( RSS_URL )
If rssData.parseError.errorCode <> 0 Then
response.write reason
End If
Set rssHeader = rssData.getElementsByTagName("channel")

<!-- DOESN'T LIKE THIS LINE -->
lastUpdated = rssHeader.item(0).childNodes(4).text
<!-- ********************** -->

Set rssContent = rssData.getElementsByTagName("item")
rssRows = rssContent.length
%>

Any help would be greatly appreciated as I've been sat here for days!!

Thanks,
Carolyn
Jul 20 '05 #1
1 8913
"Carolyn Speakman" <ca**************@idom.co.uk> wrote in message
news:3c**************************@posting.google.c om...
<!-- DOESN'T LIKE THIS LINE -->
lastUpdated = rssHeader.item(0).childNodes(4).text
<!-- ********************** -->


The VBScript runtime error "Object required" is roughly equivalent to an
invalid pointer exception in other languages.

The code assumes that rssHeader.item(0) returns a valid object (let's call
it X), and ditto for X.childNodes(4). Either of these method calls could
"fail" and return the null value. OTOH I forget how VBScript represents the
null value; you should be able to glean this info from any VBScript
reference.

Add some error checking, and/or take a look at the data, ie., experimental
values for the channel element and its sub-elements. See whether these
methods are returning valid objects, and if not, why not. The documentation
for MSXML DOM may be helpful in this regard.

Clearly your test runs on the server and local machine are getting data that
is structured differently. Perhaps this clue in and of itself will point to
a solution.

Hope this helps.

/kmc
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Apostolis K. | last post by:
At first I make a independend virtual directory wich I named app and I check Directory Browsing in the Virtual Directory Properties. Then I create with notepad global.asa and index.asp ...
4
by: Oli | last post by:
Hi Hope someone can help: <% set rsProdInfo = Server.CreateObject("ADODB.Recordset") rsProdInfo.Open "TBL_Products", Conn intTotal = 0
14
by: shank | last post by:
I get this error and can't figure out the correct syntax. Doesn't seem to make a difference changing the quotes around. Thanks! --------------------- Syntax error (missing operator) in query...
0
by: jai80 | last post by:
hi frenz, i have developed an asp page,fetching records from database(sql server 2000). i have placed the orderids as hyperlinks in this page, which when clicked will open another asp page. when i...
1
by: puafo | last post by:
The following is the code I am using for the addnew and the select clause: <%Option Explicit%> <% IF session("sessionID") = "" THEN Response.Redirect "adminLogin.asp" END IF %> <%
0
by: Jennifer.Berube | last post by:
So I setup my code finally got the connection string (include utility.asp file) thanks to one of ya'll on here and now I have a new problem... This is the error I'm getting: Error Type:...
4
by: Genken | last post by:
Hi can anybody help me i get this error when running this code. Error Type: Microsoft VBScript runtime (0x800A01A8) Object required: '' And then a line number indicating where the error is, i...
1
by: mudasserrafiq | last post by:
I am using following asp file default.asp <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <META http-equiv=Content-Type content="text/html; charset=windows-1252"> <META content="0...
10
by: jasone | last post by:
hi everyone! any advice given will be MUCH appreciated, i have spent about 10 hours on this bit of script... a rating system. I am having realt trouble overcoming this problem at runtime ...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.