JScript runtime error '800a138f' 'undefined' is null or not an obj

  • Thread starter Dan Roberts @ Kent State
  • Start date
D

Dan Roberts @ Kent State

I am running some off-the-shelf software that is written in ASP, which uses
JScript to generate dynamic content within HTML forms. There are several ASP
pages which are partially rendering to IE, but stop midway through with an
error embeded in the page: "Microsoft JScript runtime error '800a138f'
'undefined' is null or not an object".

The software package has a large install base with no other customer having
this problem. I also have a second identical install on another server
pointing to the same SQL database, and it doesn't exibit this problem either.

Our own developers were able to work around the problem by making a small
change to the code.

The original code:

<%=String(rs("Question")).length > 100?
RemoveHTML(String(rs("Section"))).substr(0, 100) + "...":
RemoveHTML(String(rs("Section")))%>

Changed to:

<%if (String(rs("Section")).length > 100)
{Response.Write(String(rs("Section")).substr(0, 100) + "...") ;} else {
Response.Write(rs("Section")); }%>

The latter bit of code had to have two changes.. one to change the odd
conditional statement to a more traditional if-statement, and second to avoid
calling the RemoveHTML function, both which cause an error.

function RemoveHTML(Expresion)
on error resume next
Dim RegEx
Set RegEx = New RegExp
RegEx.Pattern = "<[^>]*>"
RegEx.Global = True
Expresion = Replace(Expresion, "<br>", chr(10))
RemoveHTML = RegEx.Replace(Expresion, "")
end function

I've searched Microsoft's KB and Googled the error, and so far nothing
useful has come up. Any ideas on what the cause is or how I can further
troubleshoot?

!!! Again, there is nothing wrong with the code.. it works on hundreds of
other servers. There is something particular about my server that is causing
this !!!

Thanks in advance for any help anyone can offer!
 
J

Jon

It would seem odd it would be server-dependent. But for my morbid curiosity
what server are you using? And is this different to the ones other people
are using?
 
B

Bullschmidt

Sometimes it can be as simple as a missing quote such as:

...width="100%>

Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
 
D

Dan Roberts @ Kent State

They are both Windows 2000 Advanced Server with service pack 4 and identical
patches installed, both on Dell PowerEdge servers. I don't know for certain
what their other customers are running.. presumably W2K since I was told
during one of our conference calls that 2003 wasn't supported yet, and on any
number of possible hardware combinations.

--
Dan Roberts, MCSE
Systems Administrator
Administrative Computing Services
Kent State University


Jon said:
It would seem odd it would be server-dependent. But for my morbid curiosity
what server are you using? And is this different to the ones other people
are using?

--
Jon
(e-mail address removed)
Look at that dead pixel on your screen! *SLAP* Gotcha!

Dan Roberts @ Kent State said:
I am running some off-the-shelf software that is written in ASP, which uses
JScript to generate dynamic content within HTML forms. There are several
ASP
pages which are partially rendering to IE, but stop midway through with an
error embeded in the page: "Microsoft JScript runtime error '800a138f'
'undefined' is null or not an object".

The software package has a large install base with no other customer
having
this problem. I also have a second identical install on another server
pointing to the same SQL database, and it doesn't exibit this problem
either.

Our own developers were able to work around the problem by making a small
change to the code.

The original code:

<%=String(rs("Question")).length > 100?
RemoveHTML(String(rs("Section"))).substr(0, 100) + "...":
RemoveHTML(String(rs("Section")))%>

Changed to:

<%if (String(rs("Section")).length > 100)
{Response.Write(String(rs("Section")).substr(0, 100) + "...") ;} else {
Response.Write(rs("Section")); }%>

The latter bit of code had to have two changes.. one to change the odd
conditional statement to a more traditional if-statement, and second to
avoid
calling the RemoveHTML function, both which cause an error.

function RemoveHTML(Expresion)
on error resume next
Dim RegEx
Set RegEx = New RegExp
RegEx.Pattern = "<[^>]*>"
RegEx.Global = True
Expresion = Replace(Expresion, "<br>", chr(10))
RemoveHTML = RegEx.Replace(Expresion, "")
end function

I've searched Microsoft's KB and Googled the error, and so far nothing
useful has come up. Any ideas on what the cause is or how I can further
troubleshoot?

!!! Again, there is nothing wrong with the code.. it works on hundreds of
other servers. There is something particular about my server that is
causing
this !!!

Thanks in advance for any help anyone can offer!

--
Dan Roberts, MCSE
Systems Administrator
Administrative Computing Services
Kent State University
 
M

Mark Schupp

You probably have a null value in one of the columns in the database for
that installation. Perhaps the ? syntax treats null values differently than
the if/else syntax.

--
--Mark Schupp


Dan Roberts @ Kent State said:
They are both Windows 2000 Advanced Server with service pack 4 and
identical
patches installed, both on Dell PowerEdge servers. I don't know for
certain
what their other customers are running.. presumably W2K since I was told
during one of our conference calls that 2003 wasn't supported yet, and on
any
number of possible hardware combinations.

--
Dan Roberts, MCSE
Systems Administrator
Administrative Computing Services
Kent State University


Jon said:
It would seem odd it would be server-dependent. But for my morbid
curiosity
what server are you using? And is this different to the ones other people
are using?

--
Jon
(e-mail address removed)
Look at that dead pixel on your screen! *SLAP* Gotcha!

"Dan Roberts @ Kent State"
<[email protected]>
wrote in message
I am running some off-the-shelf software that is written in ASP, which
uses
JScript to generate dynamic content within HTML forms. There are
several
ASP
pages which are partially rendering to IE, but stop midway through with
an
error embeded in the page: "Microsoft JScript runtime error '800a138f'
'undefined' is null or not an object".

The software package has a large install base with no other customer
having
this problem. I also have a second identical install on another server
pointing to the same SQL database, and it doesn't exibit this problem
either.

Our own developers were able to work around the problem by making a
small
change to the code.

The original code:

<%=String(rs("Question")).length > 100?
RemoveHTML(String(rs("Section"))).substr(0, 100) + "...":
RemoveHTML(String(rs("Section")))%>

Changed to:

<%if (String(rs("Section")).length > 100)
{Response.Write(String(rs("Section")).substr(0, 100) + "...") ;} else {
Response.Write(rs("Section")); }%>

The latter bit of code had to have two changes.. one to change the odd
conditional statement to a more traditional if-statement, and second to
avoid
calling the RemoveHTML function, both which cause an error.

function RemoveHTML(Expresion)
on error resume next
Dim RegEx
Set RegEx = New RegExp
RegEx.Pattern = "<[^>]*>"
RegEx.Global = True
Expresion = Replace(Expresion, "<br>", chr(10))
RemoveHTML = RegEx.Replace(Expresion, "")
end function

I've searched Microsoft's KB and Googled the error, and so far nothing
useful has come up. Any ideas on what the cause is or how I can
further
troubleshoot?

!!! Again, there is nothing wrong with the code.. it works on hundreds
of
other servers. There is something particular about my server that is
causing
this !!!

Thanks in advance for any help anyone can offer!

--
Dan Roberts, MCSE
Systems Administrator
Administrative Computing Services
Kent State University
 
D

Dan Roberts @ Kent State

Thanks Mark, the database call is returning valid results.. but I'll have to
follow up on your comment about the ? operator with some testing. Not sure
why that didn't occur to me.

Something else we've discovered is that regular expressions are not working
at all on the problem server. I isolated the code from the RemoveHTML
function into its own ASP page and it consistantly returns null when I pass
it a value.

Any idea why regex would not be working on this server?

--
Dan Roberts, MCSE
Systems Administrator
Administrative Computing Services
Kent State University


Mark Schupp said:
You probably have a null value in one of the columns in the database for
that installation. Perhaps the ? syntax treats null values differently than
the if/else syntax.

--
--Mark Schupp


Dan Roberts @ Kent State said:
They are both Windows 2000 Advanced Server with service pack 4 and
identical
patches installed, both on Dell PowerEdge servers. I don't know for
certain
what their other customers are running.. presumably W2K since I was told
during one of our conference calls that 2003 wasn't supported yet, and on
any
number of possible hardware combinations.

--
Dan Roberts, MCSE
Systems Administrator
Administrative Computing Services
Kent State University


Jon said:
It would seem odd it would be server-dependent. But for my morbid
curiosity
what server are you using? And is this different to the ones other people
are using?

--
Jon
(e-mail address removed)
Look at that dead pixel on your screen! *SLAP* Gotcha!

"Dan Roberts @ Kent State"
<[email protected]>
wrote in message
I am running some off-the-shelf software that is written in ASP, which
uses
JScript to generate dynamic content within HTML forms. There are
several
ASP
pages which are partially rendering to IE, but stop midway through with
an
error embeded in the page: "Microsoft JScript runtime error '800a138f'
'undefined' is null or not an object".

The software package has a large install base with no other customer
having
this problem. I also have a second identical install on another server
pointing to the same SQL database, and it doesn't exibit this problem
either.

Our own developers were able to work around the problem by making a
small
change to the code.

The original code:

<%=String(rs("Question")).length > 100?
RemoveHTML(String(rs("Section"))).substr(0, 100) + "...":
RemoveHTML(String(rs("Section")))%>

Changed to:

<%if (String(rs("Section")).length > 100)
{Response.Write(String(rs("Section")).substr(0, 100) + "...") ;} else {
Response.Write(rs("Section")); }%>

The latter bit of code had to have two changes.. one to change the odd
conditional statement to a more traditional if-statement, and second to
avoid
calling the RemoveHTML function, both which cause an error.

function RemoveHTML(Expresion)
on error resume next
Dim RegEx
Set RegEx = New RegExp
RegEx.Pattern = "<[^>]*>"
RegEx.Global = True
Expresion = Replace(Expresion, "<br>", chr(10))
RemoveHTML = RegEx.Replace(Expresion, "")
end function

I've searched Microsoft's KB and Googled the error, and so far nothing
useful has come up. Any ideas on what the cause is or how I can
further
troubleshoot?

!!! Again, there is nothing wrong with the code.. it works on hundreds
of
other servers. There is something particular about my server that is
causing
this !!!

Thanks in advance for any help anyone can offer!

--
Dan Roberts, MCSE
Systems Administrator
Administrative Computing Services
Kent State University
 
M

Mark Schupp

What happens if you remove the "on error resume next"?

--
--Mark Schupp


Dan Roberts @ Kent State said:
Thanks Mark, the database call is returning valid results.. but I'll have
to
follow up on your comment about the ? operator with some testing. Not
sure
why that didn't occur to me.

Something else we've discovered is that regular expressions are not
working
at all on the problem server. I isolated the code from the RemoveHTML
function into its own ASP page and it consistantly returns null when I
pass
it a value.

Any idea why regex would not be working on this server?

--
Dan Roberts, MCSE
Systems Administrator
Administrative Computing Services
Kent State University


Mark Schupp said:
You probably have a null value in one of the columns in the database for
that installation. Perhaps the ? syntax treats null values differently
than
the if/else syntax.

--
--Mark Schupp


"Dan Roberts @ Kent State"
<[email protected]>
wrote in message
They are both Windows 2000 Advanced Server with service pack 4 and
identical
patches installed, both on Dell PowerEdge servers. I don't know for
certain
what their other customers are running.. presumably W2K since I was
told
during one of our conference calls that 2003 wasn't supported yet, and
on
any
number of possible hardware combinations.

--
Dan Roberts, MCSE
Systems Administrator
Administrative Computing Services
Kent State University


:

It would seem odd it would be server-dependent. But for my morbid
curiosity
what server are you using? And is this different to the ones other
people
are using?

--
Jon
(e-mail address removed)
Look at that dead pixel on your screen! *SLAP* Gotcha!

"Dan Roberts @ Kent State"
<[email protected]>
wrote in message
I am running some off-the-shelf software that is written in ASP,
which
uses
JScript to generate dynamic content within HTML forms. There are
several
ASP
pages which are partially rendering to IE, but stop midway through
with
an
error embeded in the page: "Microsoft JScript runtime error
'800a138f'
'undefined' is null or not an object".

The software package has a large install base with no other customer
having
this problem. I also have a second identical install on another
server
pointing to the same SQL database, and it doesn't exibit this
problem
either.

Our own developers were able to work around the problem by making a
small
change to the code.

The original code:

<%=String(rs("Question")).length > 100?
RemoveHTML(String(rs("Section"))).substr(0, 100) + "...":
RemoveHTML(String(rs("Section")))%>

Changed to:

<%if (String(rs("Section")).length > 100)
{Response.Write(String(rs("Section")).substr(0, 100) + "...") ;}
else {
Response.Write(rs("Section")); }%>

The latter bit of code had to have two changes.. one to change the
odd
conditional statement to a more traditional if-statement, and second
to
avoid
calling the RemoveHTML function, both which cause an error.

function RemoveHTML(Expresion)
on error resume next
Dim RegEx
Set RegEx = New RegExp
RegEx.Pattern = "<[^>]*>"
RegEx.Global = True
Expresion = Replace(Expresion, "<br>", chr(10))
RemoveHTML = RegEx.Replace(Expresion, "")
end function

I've searched Microsoft's KB and Googled the error, and so far
nothing
useful has come up. Any ideas on what the cause is or how I can
further
troubleshoot?

!!! Again, there is nothing wrong with the code.. it works on
hundreds
of
other servers. There is something particular about my server that
is
causing
this !!!

Thanks in advance for any help anyone can offer!

--
Dan Roberts, MCSE
Systems Administrator
Administrative Computing Services
Kent State University
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,062
Latest member
OrderKetozenseACV

Latest Threads

Top