Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Error if page is left over night?

LEGEND ,
Aug 30, 2007 Aug 30, 2007

Copy link to clipboard

Copied

I get an error with my site if I leave it overnight and return to it in
the morning. In normal use, the page works fine but if I leave the page
open over night, the session ends and if I hit refresh, I get an error.
I know this isn't a lot to go by but is there a way to check it? Is
there a way to check for the error and if it detects the error, it
forwards to the home page?

Microsoft VBScript runtime error '800a000d'

Type mismatch: 'strCrumb'

/breadcrumb.inc, line 22


-------------------------------breadcrumb.inc

<%
function writeBreadCrumb(strCurrentCrumbTitle)
Dim strCrumb
Dim strXMLCrumb
Dim xmlDoc
Dim objCurrNode
Dim objAttrib
Dim objChild
Dim strLink
Dim strTitle
Dim strReqLink

set xmlDoc = server.createObject("Microsoft.XMLDOM")
strXMLCrumb = session("breadcrumbXML")

'Get currently requested page with variables
strReqLink = request.serverVariables("URL") & _
"?" & request.serverVariables("Query_String")
If strXMLCrumb = "" then
strCrumb = "<a href=""index.asp"">Home</a>" & _
" > "
strCrumb = strCrumb + strCurrentCrumbTitle
strXMLCrumb = "<Breadcrumb> " & vbcrlf & _
"<Page " & "Title=""" & _
strCurrentCrumbTitle & """ " & _
"Link=""" & strReqLink & """></Page>" & _
vbcrlf & "</Breadcrumb>"
session("breadcrumbXML") = strXMLCrumb
else
mDummy = xmlDoc.loadXML(strXMLCrumb)
do
if strCrumb = "" then
strCrumb = _
"<a href=""index.asp"">Home</a>" & _
" > "
Set objCurrNode = xmlDoc.FirstChild
end if
set objCurrNode = objCurrNode.firstChild
for each objAttrib in objCurrNode.attributes
if objAttrib.baseName = "Title" then
strTitle = objAttrib.text
end if
if objAttrib.baseName = "Link" then
strLink = objAttrib.text
end if
next
if strCurrentCrumbTitle = strTitle then
if objCurrNode.hasChildNodes() = true then
for each objChild in objCurrNode.childNodes
objCurrNode.removeChild objChild
next
end if
for each objAttrib in objCurrNode.attributes
if objAttrib.baseName = "Link" then
objAttrib.text = strReqLink
end if
next
strCrumb = strCrumb & strTitle
exit do
else
strCrumb = strCrumb & _
"<a href=""" & strLink & """>" & _
strTitle & "</a>" & " > "
if objCurrNode.hasChildNodes() = False then
set objChild = _
xmlDoc.createNode("element", "Page", "")
set objAttrib = _
xmlDoc.createAttribute("Title")
objAttrib.text = strCurrentCrumbTitle
set objAttrib = _
objChild.attributes.setNamedItem( _
objAttrib)
set objAttrib = xmlDoc.createAttribute( _
"Link")
objAttrib.text = strReqLink
set objAttrib = _
objChild.attributes.setNamedItem( _
objAttrib)
set objChild = objCurrNode.appendChild( _
objChild)
strCrumb = strCrumb & strCurrentCrumbTitle
exit do
else
'Do nothing
end if
end if
loop
session("breadcrumbXML") = xmldoc.xml
end if

response.write strCrumb
set xmlDoc = nothing
set objCurrNode = nothing
set objAttrib = nothing
set objChild = nothing
end function
%>
TOPICS
Server side applications

Views

630
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 30, 2007 Aug 30, 2007

Copy link to clipboard

Copied

I think the problem with this is that this function doesn't check if it
is actually on the home page; it assumes that it is if there is no
session. Consequently, it thinks, because there is no session that the
current page is the home page. Once I go to the home page, it begins to
work again.

Lee wrote:
> I get an error with my site if I leave it overnight and return to it in
> the morning. In normal use, the page works fine but if I leave the page
> open over night, the session ends and if I hit refresh, I get an error.
> I know this isn't a lot to go by but is there a way to check it? Is
> there a way to check for the error and if it detects the error, it
> forwards to the home page?
>
> Microsoft VBScript runtime error '800a000d'
>
> Type mismatch: 'strCrumb'
>
> /breadcrumb.inc, line 22
>
>
> -------------------------------breadcrumb.inc
>
> <%
> function writeBreadCrumb(strCurrentCrumbTitle)
> Dim strCrumb
> Dim strXMLCrumb
> Dim xmlDoc
> Dim objCurrNode
> Dim objAttrib
> Dim objChild
> Dim strLink
> Dim strTitle
> Dim strReqLink
>
> set xmlDoc = server.createObject("Microsoft.XMLDOM")
> strXMLCrumb = session("breadcrumbXML")
>
> 'Get currently requested page with variables
> strReqLink = request.serverVariables("URL") & _
> "?" & request.serverVariables("Query_String")
> If strXMLCrumb = "" then
> strCrumb = "<a href=""index.asp"">Home</a>" & _
> " > "
> strCrumb = strCrumb + strCurrentCrumbTitle
> strXMLCrumb = "<Breadcrumb> " & vbcrlf & _
> "<Page " & "Title=""" & _
> strCurrentCrumbTitle & """ " & _
> "Link=""" & strReqLink & """></Page>" & _
> vbcrlf & "</Breadcrumb>"
> session("breadcrumbXML") = strXMLCrumb
> else
> mDummy = xmlDoc.loadXML(strXMLCrumb)
> do
> if strCrumb = "" then
> strCrumb = _
> "<a href=""index.asp"">Home</a>" & _
> " > "
> Set objCurrNode = xmlDoc.FirstChild
> end if
> set objCurrNode = objCurrNode.firstChild
> for each objAttrib in objCurrNode.attributes
> if objAttrib.baseName = "Title" then
> strTitle = objAttrib.text
> end if
> if objAttrib.baseName = "Link" then
> strLink = objAttrib.text
> end if
> next
> if strCurrentCrumbTitle = strTitle then
> if objCurrNode.hasChildNodes() = true then
> for each objChild in objCurrNode.childNodes
> objCurrNode.removeChild objChild
> next
> end if
> for each objAttrib in objCurrNode.attributes
> if objAttrib.baseName = "Link" then
> objAttrib.text = strReqLink
> end if
> next
> strCrumb = strCrumb & strTitle
> exit do
> else
> strCrumb = strCrumb & _
> "<a href=""" & strLink & """>" & _
> strTitle & "</a>" & " > "
> if objCurrNode.hasChildNodes() = False then
> set objChild = _
> xmlDoc.createNode("element", "Page", "")
> set objAttrib = _
> xmlDoc.createAttribute("Title")
> objAttrib.text = strCurrentCrumbTitle
> set objAttrib = _
> objChild.attributes.setNamedItem( _
> objAttrib)
> set objAttrib = xmlDoc.createAttribute( _
> "Link")
> objAttrib.text = strReqLink
> set objAttrib = _
> objChild.attributes.setNamedItem( _
> objAttrib)
> set objChild = objCurrNode.appendChild( _
> objChild)
> strCrumb = strCrumb & strCurrentCrumbTitle
> exit do
> else
> 'Do nothing
> end if
> end if
> loop
> session("breadcrumbXML") = xmldoc.xml
> end if
>
> response.write strCrumb
> set xmlDoc = nothing
> set objCurrNode = nothing
> set objAttrib = nothing
> set objChild = nothing
> end function
> %>

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 30, 2007 Aug 30, 2007

Copy link to clipboard

Copied

By the way, I didn't come up with this as is probably obvious. It comes
from: http://www.yasuremedia.com/Breadcrumb/Breadcrumb.htm There's a
good explanation of how this breadcrumb works.

Lee wrote:
> I think the problem with this is that this function doesn't check if it
> is actually on the home page; it assumes that it is if there is no
> session. Consequently, it thinks, because there is no session that the
> current page is the home page. Once I go to the home page, it begins to
> work again.
>
> Lee wrote:
>> I get an error with my site if I leave it overnight and return to it
>> in the morning. In normal use, the page works fine but if I leave the
>> page open over night, the session ends and if I hit refresh, I get an
>> error. I know this isn't a lot to go by but is there a way to check
>> it? Is there a way to check for the error and if it detects the error,
>> it forwards to the home page?
>>
>> Microsoft VBScript runtime error '800a000d'
>>
>> Type mismatch: 'strCrumb'
>>
>> /breadcrumb.inc, line 22
>>
>>
>> -------------------------------breadcrumb.inc
>>
>> <%
>> function writeBreadCrumb(strCurrentCrumbTitle)
>> Dim strCrumb
>> Dim strXMLCrumb
>> Dim xmlDoc
>> Dim objCurrNode
>> Dim objAttrib
>> Dim objChild
>> Dim strLink
>> Dim strTitle
>> Dim strReqLink
>>
>> set xmlDoc = server.createObject("Microsoft.XMLDOM")
>> strXMLCrumb = session("breadcrumbXML")
>>
>> 'Get currently requested page with variables
>> strReqLink = request.serverVariables("URL") & _
>> "?" & request.serverVariables("Query_String")
>> If strXMLCrumb = "" then
>> strCrumb = "<a href=""index.asp"">Home</a>" & _
>> " > "
>> strCrumb = strCrumb + strCurrentCrumbTitle
>> strXMLCrumb = "<Breadcrumb> " & vbcrlf & _
>> "<Page " & "Title=""" & _
>> strCurrentCrumbTitle & """ " & _
>> "Link=""" & strReqLink & """></Page>" & _
>> vbcrlf & "</Breadcrumb>"
>> session("breadcrumbXML") = strXMLCrumb
>> else mDummy = xmlDoc.loadXML(strXMLCrumb)
>> do
>> if strCrumb = "" then
>> strCrumb = _
>> "<a href=""index.asp"">Home</a>" & _
>> " > "
>> Set objCurrNode = xmlDoc.FirstChild
>> end if
>> set objCurrNode = objCurrNode.firstChild
>> for each objAttrib in objCurrNode.attributes
>> if objAttrib.baseName = "Title" then
>> strTitle = objAttrib.text
>> end if
>> if objAttrib.baseName = "Link" then
>> strLink = objAttrib.text
>> end if
>> next
>> if strCurrentCrumbTitle = strTitle then
>> if objCurrNode.hasChildNodes() = true then
>> for each objChild in objCurrNode.childNodes
>> objCurrNode.removeChild objChild
>> next
>> end if
>> for each objAttrib in objCurrNode.attributes
>> if objAttrib.baseName = "Link" then
>> objAttrib.text = strReqLink
>> end if next
>> strCrumb = strCrumb & strTitle
>> exit do
>> else
>> strCrumb = strCrumb & _
>> "<a href=""" & strLink & """>" & _
>> strTitle & "</a>" & " > "
>> if objCurrNode.hasChildNodes() = False then
>> set objChild = _
>> xmlDoc.createNode("element", "Page", "")
>> set objAttrib = _
>> xmlDoc.createAttribute("Title")
>> objAttrib.text = strCurrentCrumbTitle
>> set objAttrib = _
>> objChild.attributes.setNamedItem( _
>> objAttrib)
>> set objAttrib = xmlDoc.createAttribute( _
>> "Link")
>> objAttrib.text = strReqLink
>> set objAttrib = _
>> objChild.attributes.setNamedItem( _
>> objAttrib)
>> set objChild = objCurrNode.appendChild( _
>> objChild)
>> strCrumb = strCrumb & strCurrentCrumbTitle
>> exit do
>> else
>> 'Do nothing
>> end if end if
>> loop
>> session("breadcrumbXML") = xmldoc.xml
>> end if
>>
>> response.write strCrumb
>> set xmlDoc = nothing
>> set objCurrNode = nothing
>> set objAttrib = nothing
>> set objChild = nothing
>> end function
>> %>

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 30, 2007 Aug 30, 2007

Copy link to clipboard

Copied

Any ideas?

Lee wrote:
> By the way, I didn't come up with this as is probably obvious. It comes
> from: http://www.yasuremedia.com/Breadcrumb/Breadcrumb.htm There's a
> good explanation of how this breadcrumb works.
>
> Lee wrote:
>> I think the problem with this is that this function doesn't check if
>> it is actually on the home page; it assumes that it is if there is no
>> session. Consequently, it thinks, because there is no session that the
>> current page is the home page. Once I go to the home page, it begins
>> to work again.
>>
>> Lee wrote:
>>> I get an error with my site if I leave it overnight and return to it
>>> in the morning. In normal use, the page works fine but if I leave the
>>> page open over night, the session ends and if I hit refresh, I get an
>>> error. I know this isn't a lot to go by but is there a way to check
>>> it? Is there a way to check for the error and if it detects the
>>> error, it forwards to the home page?
>>>
>>> Microsoft VBScript runtime error '800a000d'
>>>
>>> Type mismatch: 'strCrumb'
>>>
>>> /breadcrumb.inc, line 22
>>>
>>>
>>> -------------------------------breadcrumb.inc
>>>
>>> <%
>>> function writeBreadCrumb(strCurrentCrumbTitle)
>>> Dim strCrumb
>>> Dim strXMLCrumb
>>> Dim xmlDoc
>>> Dim objCurrNode
>>> Dim objAttrib
>>> Dim objChild
>>> Dim strLink
>>> Dim strTitle
>>> Dim strReqLink
>>>
>>> set xmlDoc = server.createObject("Microsoft.XMLDOM")
>>> strXMLCrumb = session("breadcrumbXML")
>>>
>>> 'Get currently requested page with variables
>>> strReqLink = request.serverVariables("URL") & _
>>> "?" & request.serverVariables("Query_String")
>>> If strXMLCrumb = "" then
>>> strCrumb = "<a href=""index.asp"">Home</a>" & _
>>> " > "
>>> strCrumb = strCrumb + strCurrentCrumbTitle
>>> strXMLCrumb = "<Breadcrumb> " & vbcrlf & _
>>> "<Page " & "Title=""" & _
>>> strCurrentCrumbTitle & """ " & _
>>> "Link=""" & strReqLink & """></Page>" & _
>>> vbcrlf & "</Breadcrumb>"
>>> session("breadcrumbXML") = strXMLCrumb
>>> else mDummy = xmlDoc.loadXML(strXMLCrumb)
>>> do
>>> if strCrumb = "" then
>>> strCrumb = _
>>> "<a href=""index.asp"">Home</a>" & _
>>> " > "
>>> Set objCurrNode = xmlDoc.FirstChild
>>> end if
>>> set objCurrNode = objCurrNode.firstChild
>>> for each objAttrib in objCurrNode.attributes
>>> if objAttrib.baseName = "Title" then
>>> strTitle = objAttrib.text
>>> end if
>>> if objAttrib.baseName = "Link" then
>>> strLink = objAttrib.text
>>> end if
>>> next
>>> if strCurrentCrumbTitle = strTitle then
>>> if objCurrNode.hasChildNodes() = true then
>>> for each objChild in objCurrNode.childNodes
>>> objCurrNode.removeChild objChild
>>> next
>>> end if
>>> for each objAttrib in objCurrNode.attributes
>>> if objAttrib.baseName = "Link" then
>>> objAttrib.text = strReqLink
>>> end if next
>>> strCrumb = strCrumb & strTitle
>>> exit do
>>> else
>>> strCrumb = strCrumb & _
>>> "<a href=""" & strLink & """>" & _
>>> strTitle & "</a>" & " > "
>>> if objCurrNode.hasChildNodes() = False then
>>> set objChild = _
>>> xmlDoc.createNode("element", "Page", "")
>>> set objAttrib = _
>>> xmlDoc.createAttribute("Title")
>>> objAttrib.text = strCurrentCrumbTitle
>>> set objAttrib = _
>>> objChild.attributes.setNamedItem( _
>>> objAttrib)
>>> set objAttrib = xmlDoc.createAttribute( _
>>> "Link")
>>> objAttrib.text = strReqLink
>>> set objAttrib = _
>>> objChild.attributes.setNamedItem( _
>>> objAttrib)
>>> set objChild = objCurrNode.appendChild( _
>>> objChild)
>>> strCrumb = strCrumb & strCurrentCrumbTitle
>>> exit do
>>> else
>>> 'Do nothing
>>> end if end if
>>> loop
>>> session("breadcrumbXML") = xmldoc.xml
>>> end if
>>>
>>> response.write strCrumb
>>> set xmlDoc = nothing
>>> set objCurrNode = nothing
>>> set objAttrib = nothing
>>> set objChild = nothing
>>> end function
>>> %>

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 31, 2007 Aug 31, 2007

Copy link to clipboard

Copied

Nobody has responded to this. Is there any additional information I can
provide?

Lee wrote:
> I get an error with my site if I leave it overnight and return to it in
> the morning. In normal use, the page works fine but if I leave the page
> open over night, the session ends and if I hit refresh, I get an error.
> I know this isn't a lot to go by but is there a way to check it? Is
> there a way to check for the error and if it detects the error, it
> forwards to the home page?
>
> Microsoft VBScript runtime error '800a000d'
>
> Type mismatch: 'strCrumb'
>
> /breadcrumb.inc, line 22
>
>
> -------------------------------breadcrumb.inc
>
> <%
> function writeBreadCrumb(strCurrentCrumbTitle)
> Dim strCrumb
> Dim strXMLCrumb
> Dim xmlDoc
> Dim objCurrNode
> Dim objAttrib
> Dim objChild
> Dim strLink
> Dim strTitle
> Dim strReqLink
>
> set xmlDoc = server.createObject("Microsoft.XMLDOM")
> strXMLCrumb = session("breadcrumbXML")
>
> 'Get currently requested page with variables
> strReqLink = request.serverVariables("URL") & _
> "?" & request.serverVariables("Query_String")
> If strXMLCrumb = "" then
> strCrumb = "<a href=""index.asp"">Home</a>" & _
> " > "
> strCrumb = strCrumb + strCurrentCrumbTitle
> strXMLCrumb = "<Breadcrumb> " & vbcrlf & _
> "<Page " & "Title=""" & _
> strCurrentCrumbTitle & """ " & _
> "Link=""" & strReqLink & """></Page>" & _
> vbcrlf & "</Breadcrumb>"
> session("breadcrumbXML") = strXMLCrumb
> else
> mDummy = xmlDoc.loadXML(strXMLCrumb)
> do
> if strCrumb = "" then
> strCrumb = _
> "<a href=""index.asp"">Home</a>" & _
> " > "
> Set objCurrNode = xmlDoc.FirstChild
> end if
> set objCurrNode = objCurrNode.firstChild
> for each objAttrib in objCurrNode.attributes
> if objAttrib.baseName = "Title" then
> strTitle = objAttrib.text
> end if
> if objAttrib.baseName = "Link" then
> strLink = objAttrib.text
> end if
> next
> if strCurrentCrumbTitle = strTitle then
> if objCurrNode.hasChildNodes() = true then
> for each objChild in objCurrNode.childNodes
> objCurrNode.removeChild objChild
> next
> end if
> for each objAttrib in objCurrNode.attributes
> if objAttrib.baseName = "Link" then
> objAttrib.text = strReqLink
> end if
> next
> strCrumb = strCrumb & strTitle
> exit do
> else
> strCrumb = strCrumb & _
> "<a href=""" & strLink & """>" & _
> strTitle & "</a>" & " > "
> if objCurrNode.hasChildNodes() = False then
> set objChild = _
> xmlDoc.createNode("element", "Page", "")
> set objAttrib = _
> xmlDoc.createAttribute("Title")
> objAttrib.text = strCurrentCrumbTitle
> set objAttrib = _
> objChild.attributes.setNamedItem( _
> objAttrib)
> set objAttrib = xmlDoc.createAttribute( _
> "Link")
> objAttrib.text = strReqLink
> set objAttrib = _
> objChild.attributes.setNamedItem( _
> objAttrib)
> set objChild = objCurrNode.appendChild( _
> objChild)
> strCrumb = strCrumb & strCurrentCrumbTitle
> exit do
> else
> 'Do nothing
> end if
> end if
> loop
> session("breadcrumbXML") = xmldoc.xml
> end if
>
> response.write strCrumb
> set xmlDoc = nothing
> set objCurrNode = nothing
> set objAttrib = nothing
> set objChild = nothing
> end function
> %>

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 05, 2007 Sep 05, 2007

Copy link to clipboard

Copied

Does CS3 Dreamweaver have something built in that creates a good
breadcrumb system? Spry?

Lee wrote:
> Nobody has responded to this. Is there any additional information I can
> provide?
>
> Lee wrote:
>> I get an error with my site if I leave it overnight and return to it
>> in the morning. In normal use, the page works fine but if I leave the
>> page open over night, the session ends and if I hit refresh, I get an
>> error. I know this isn't a lot to go by but is there a way to check
>> it? Is there a way to check for the error and if it detects the error,
>> it forwards to the home page?
>>
>> Microsoft VBScript runtime error '800a000d'
>>
>> Type mismatch: 'strCrumb'
>>
>> /breadcrumb.inc, line 22
>>
>>
>> -------------------------------breadcrumb.inc
>>
>> <%
>> function writeBreadCrumb(strCurrentCrumbTitle)
>> Dim strCrumb
>> Dim strXMLCrumb
>> Dim xmlDoc
>> Dim objCurrNode
>> Dim objAttrib
>> Dim objChild
>> Dim strLink
>> Dim strTitle
>> Dim strReqLink
>>
>> set xmlDoc = server.createObject("Microsoft.XMLDOM")
>> strXMLCrumb = session("breadcrumbXML")
>>
>> 'Get currently requested page with variables
>> strReqLink = request.serverVariables("URL") & _
>> "?" & request.serverVariables("Query_String")
>> If strXMLCrumb = "" then
>> strCrumb = "<a href=""index.asp"">Home</a>" & _
>> " > "
>> strCrumb = strCrumb + strCurrentCrumbTitle
>> strXMLCrumb = "<Breadcrumb> " & vbcrlf & _
>> "<Page " & "Title=""" & _
>> strCurrentCrumbTitle & """ " & _
>> "Link=""" & strReqLink & """></Page>" & _
>> vbcrlf & "</Breadcrumb>"
>> session("breadcrumbXML") = strXMLCrumb
>> else mDummy = xmlDoc.loadXML(strXMLCrumb)
>> do
>> if strCrumb = "" then
>> strCrumb = _
>> "<a href=""index.asp"">Home</a>" & _
>> " > "
>> Set objCurrNode = xmlDoc.FirstChild
>> end if
>> set objCurrNode = objCurrNode.firstChild
>> for each objAttrib in objCurrNode.attributes
>> if objAttrib.baseName = "Title" then
>> strTitle = objAttrib.text
>> end if
>> if objAttrib.baseName = "Link" then
>> strLink = objAttrib.text
>> end if
>> next
>> if strCurrentCrumbTitle = strTitle then
>> if objCurrNode.hasChildNodes() = true then
>> for each objChild in objCurrNode.childNodes
>> objCurrNode.removeChild objChild
>> next
>> end if
>> for each objAttrib in objCurrNode.attributes
>> if objAttrib.baseName = "Link" then
>> objAttrib.text = strReqLink
>> end if next
>> strCrumb = strCrumb & strTitle
>> exit do
>> else
>> strCrumb = strCrumb & _
>> "<a href=""" & strLink & """>" & _
>> strTitle & "</a>" & " > "
>> if objCurrNode.hasChildNodes() = False then
>> set objChild = _
>> xmlDoc.createNode("element", "Page", "")
>> set objAttrib = _
>> xmlDoc.createAttribute("Title")
>> objAttrib.text = strCurrentCrumbTitle
>> set objAttrib = _
>> objChild.attributes.setNamedItem( _
>> objAttrib)
>> set objAttrib = xmlDoc.createAttribute( _
>> "Link")
>> objAttrib.text = strReqLink
>> set objAttrib = _
>> objChild.attributes.setNamedItem( _
>> objAttrib)
>> set objChild = objCurrNode.appendChild( _
>> objChild)
>> strCrumb = strCrumb & strCurrentCrumbTitle
>> exit do
>> else
>> 'Do nothing
>> end if end if
>> loop
>> session("breadcrumbXML") = xmldoc.xml
>> end if
>>
>> response.write strCrumb
>> set xmlDoc = nothing
>> set objCurrNode = nothing
>> set objAttrib = nothing
>> set objChild = nothing
>> end function
>> %>

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 06, 2007 Sep 06, 2007

Copy link to clipboard

Copied

Lee

One thing you need to learn about these forums is that most of the people
who answer them use Newsreaders, and ony skim the headers. The second that
you replied to your own posts you made it look like someone had already
answered the question.

Anyway the issue is that you have a piece in the breadcrum code like this

strXMLCrumb = session("breadcrumbXML")

A session only lasts for a maximum of 20 minutes if there is no activity so
this line will fail if you leave the browser open overnight. What you need
to do is wrap this line in an if statement something like this

if session('breadcrumbXML") = Null then
reponse.redirect("Home.asp")
end if

--
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver

Valleybiz Internet Design
www.valleybiz.net

"Lee" <lee_nospam_@artjunky.com> wrote in message
news:fb9acc$388$1@forums.macromedia.com...
> Nobody has responded to this. Is there any additional information I can
> provide?
>
> Lee wrote:
>> I get an error with my site if I leave it overnight and return to it in
>> the morning. In normal use, the page works fine but if I leave the page
>> open over night, the session ends and if I hit refresh, I get an error. I
>> know this isn't a lot to go by but is there a way to check it? Is there a
>> way to check for the error and if it detects the error, it forwards to
>> the home page?
>>
>> Microsoft VBScript runtime error '800a000d'
>>
>> Type mismatch: 'strCrumb'
>>
>> /breadcrumb.inc, line 22
>>
>>
>> -------------------------------breadcrumb.inc
>>
>> <%
>> function writeBreadCrumb(strCurrentCrumbTitle)
>> Dim strCrumb
>> Dim strXMLCrumb
>> Dim xmlDoc
>> Dim objCurrNode
>> Dim objAttrib
>> Dim objChild
>> Dim strLink
>> Dim strTitle
>> Dim strReqLink
>>
>> set xmlDoc = server.createObject("Microsoft.XMLDOM")
>> strXMLCrumb = session("breadcrumbXML")
>>
>> 'Get currently requested page with variables
>> strReqLink = request.serverVariables("URL") & _
>> "?" & request.serverVariables("Query_String")
>> If strXMLCrumb = "" then
>> strCrumb = "<a href=""index.asp"">Home</a>" & _
>> " > "
>> strCrumb = strCrumb + strCurrentCrumbTitle
>> strXMLCrumb = "<Breadcrumb> " & vbcrlf & _
>> "<Page " & "Title=""" & _
>> strCurrentCrumbTitle & """ " & _
>> "Link=""" & strReqLink & """></Page>" & _
>> vbcrlf & "</Breadcrumb>"
>> session("breadcrumbXML") = strXMLCrumb
>> else mDummy = xmlDoc.loadXML(strXMLCrumb)
>> do
>> if strCrumb = "" then
>> strCrumb = _
>> "<a href=""index.asp"">Home</a>" & _
>> " > "
>> Set objCurrNode = xmlDoc.FirstChild
>> end if
>> set objCurrNode = objCurrNode.firstChild
>> for each objAttrib in objCurrNode.attributes
>> if objAttrib.baseName = "Title" then
>> strTitle = objAttrib.text
>> end if
>> if objAttrib.baseName = "Link" then
>> strLink = objAttrib.text
>> end if
>> next
>> if strCurrentCrumbTitle = strTitle then
>> if objCurrNode.hasChildNodes() = true then
>> for each objChild in objCurrNode.childNodes
>> objCurrNode.removeChild objChild
>> next
>> end if
>> for each objAttrib in objCurrNode.attributes
>> if objAttrib.baseName = "Link" then
>> objAttrib.text = strReqLink
>> end if next
>> strCrumb = strCrumb & strTitle
>> exit do
>> else
>> strCrumb = strCrumb & _
>> "<a href=""" & strLink & """>" & _
>> strTitle & "</a>" & " > "
>> if objCurrNode.hasChildNodes() = False then
>> set objChild = _
>> xmlDoc.createNode("element", "Page", "")
>> set objAttrib = _
>> xmlDoc.createAttribute("Title")
>> objAttrib.text = strCurrentCrumbTitle
>> set objAttrib = _
>> objChild.attributes.setNamedItem( _
>> objAttrib)
>> set objAttrib = xmlDoc.createAttribute( _
>> "Link")
>> objAttrib.text = strReqLink
>> set objAttrib = _
>> objChild.attributes.setNamedItem( _
>> objAttrib)
>> set objChild = objCurrNode.appendChild( _
>> objChild)
>> strCrumb = strCrumb & strCurrentCrumbTitle
>> exit do
>> else
>> 'Do nothing
>> end if end if
>> loop
>> session("breadcrumbXML") = xmldoc.xml
>> end if
>>
>> response.write strCrumb
>> set xmlDoc = nothing
>> set objCurrNode = nothing
>> set objAttrib = nothing
>> set objChild = nothing
>> end function
>> %>


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 07, 2007 Sep 07, 2007

Copy link to clipboard

Copied

Thanks, I'll see if that works. I eventually figured that this was the
problem but checking the session and redirecting right from the top
didn't occur to me. I was thinking I had to intercept it where the error
was located, which I am sure is also possible but this is simpler. Just
sitting back here waiting for my session to expire.

By "newsreader" what do you mean? I've used email "newsreaders" for
about 8 years, not the forum but I just wanted to make sure yours and my
terminology were the same. I always view it "expanded" so it didn't
occur to me that this was an issue. Thanks again for the help.

Paul Whitham AdobeCommunityExpert wrote:
> Lee
>
> One thing you need to learn about these forums is that most of the people
> who answer them use Newsreaders, and ony skim the headers. The second that
> you replied to your own posts you made it look like someone had already
> answered the question.
>
> Anyway the issue is that you have a piece in the breadcrum code like this
>
> strXMLCrumb = session("breadcrumbXML")
>
> A session only lasts for a maximum of 20 minutes if there is no activity so
> this line will fail if you leave the browser open overnight. What you need
> to do is wrap this line in an if statement something like this
>
> if session('breadcrumbXML") = Null then
> reponse.redirect("Home.asp")
> end if
>

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 11, 2007 Sep 11, 2007

Copy link to clipboard

Copied

Microsoft VBScript runtime error '800a01a8'

Object required: 'objCurrNode'

/breadcrumb.inc, line 44

It's still giving me the error above. Line 44 is

set objCurrNode = objCurrNode.firstChild

So, it appears that the "dynamic" xml is being dumped or emptied and no
longer has a node so it throws an error. How would I redirect if I get
an xml error?

Thanks

>> something like this
>>
>> if session('breadcrumbXML") = Null then
>> reponse.redirect("Home.asp")
>> end if
>>
The breadcrumb
<%
function writeBreadCrumb(strCurrentCrumbTitle)
Dim strCrumb
Dim strXMLCrumb
Dim xmlDoc
Dim objCurrNode
Dim objAttrib
Dim objChild
Dim strLink
Dim strTitle
Dim strReqLink
Dim redirected

set xmlDoc = server.createObject("Microsoft.XMLDOM")
strXMLCrumb = session("breadcrumbXML")

if session("breadcrumbXML") = Null then
response.redirect("index.asp")
end if

'Get currently requested page with variables
strReqLink = request.serverVariables("URL") & _
"?" & request.serverVariables("Query_String")
If strXMLCrumb = "" then
strCrumb = "<a href=""index.asp"">Home</a>" & _
" > "
strCrumb = strCrumb + strCurrentCrumbTitle
strXMLCrumb = "<Breadcrumb> " & vbcrlf & _
"<Page " & "Title=""" & _
strCurrentCrumbTitle & """ " & _
"Link=""" & strReqLink & """></Page>" & _
vbcrlf & "</Breadcrumb>"
session("breadcrumbXML") = strXMLCrumb
else
mDummy = xmlDoc.loadXML(strXMLCrumb)
do
if strCrumb = "" then
strCrumb = _
"<a href=""index.asp"">Home</a>" & _
" > "
Set objCurrNode = xmlDoc.FirstChild
end if

set objCurrNode = objCurrNode.firstChild
for each objAttrib in objCurrNode.attributes
if objAttrib.baseName = "Title" then
strTitle = objAttrib.text
end if
if objAttrib.baseName = "Link" then
strLink = objAttrib.text
end if
next
if strCurrentCrumbTitle = strTitle then
if objCurrNode.hasChildNodes() = true then
for each objChild in objCurrNode.childNodes
objCurrNode.removeChild objChild
next
end if
for each objAttrib in objCurrNode.attributes
if objAttrib.baseName = "Link" then
objAttrib.text = strReqLink
end if
next
strCrumb = strCrumb & strTitle
exit do
else
strCrumb = strCrumb & _
"<a href=""" & strLink & """>" & _
strTitle & "</a>" & " > "
if objCurrNode.hasChildNodes() = False then
set objChild = _
xmlDoc.createNode("element", "Page", "")
set objAttrib = _
xmlDoc.createAttribute("Title")
objAttrib.text = strCurrentCrumbTitle
set objAttrib = _
objChild.attributes.setNamedItem( _
objAttrib)
set objAttrib = xmlDoc.createAttribute( _
"Link")
objAttrib.text = strReqLink
set objAttrib = _
objChild.attributes.setNamedItem( _
objAttrib)
set objChild = objCurrNode.appendChild( _
objChild)
strCrumb = strCrumb & strCurrentCrumbTitle
exit do
else
'Do nothing
end if
end if
loop
session("breadcrumbXML") = xmldoc.xml
end if

response.write strCrumb
set xmlDoc = nothing
set objCurrNode = nothing
set objAttrib = nothing
set objChild = nothing
end function
%>

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 11, 2007 Sep 11, 2007

Copy link to clipboard

Copied

I left the page open over lunch and without changing anything, I hit
refresh and suddenly, it's now operational. Anyone know what might cause
it to hiccup like this?

Lee wrote:
> Microsoft VBScript runtime error '800a01a8'
>
> Object required: 'objCurrNode'
>
> /breadcrumb.inc, line 44
>
> It's still giving me the error above. Line 44 is
>
> set objCurrNode = objCurrNode.firstChild
>
> So, it appears that the "dynamic" xml is being dumped or emptied and no
> longer has a node so it throws an error. How would I redirect if I get
> an xml error?
>
> Thanks
>
>>> something like this
>>>
>>> if session('breadcrumbXML") = Null then
>>> reponse.redirect("Home.asp")
>>> end if
>>>
> The breadcrumb
> <%
> function writeBreadCrumb(strCurrentCrumbTitle)
> Dim strCrumb
> Dim strXMLCrumb
> Dim xmlDoc
> Dim objCurrNode
> Dim objAttrib
> Dim objChild
> Dim strLink
> Dim strTitle
> Dim strReqLink
> Dim redirected
>
> set xmlDoc = server.createObject("Microsoft.XMLDOM")
> strXMLCrumb = session("breadcrumbXML")
>
> if session("breadcrumbXML") = Null then
> response.redirect("index.asp")
> end if
>
> 'Get currently requested page with variables
> strReqLink = request.serverVariables("URL") & _
> "?" & request.serverVariables("Query_String")
> If strXMLCrumb = "" then
> strCrumb = "<a href=""index.asp"">Home</a>" & _
> " > "
> strCrumb = strCrumb + strCurrentCrumbTitle
> strXMLCrumb = "<Breadcrumb> " & vbcrlf & _
> "<Page " & "Title=""" & _
> strCurrentCrumbTitle & """ " & _
> "Link=""" & strReqLink & """></Page>" & _
> vbcrlf & "</Breadcrumb>"
> session("breadcrumbXML") = strXMLCrumb
> else
> mDummy = xmlDoc.loadXML(strXMLCrumb)
> do
> if strCrumb = "" then
> strCrumb = _
> "<a href=""index.asp"">Home</a>" & _
> " > "
> Set objCurrNode = xmlDoc.FirstChild
> end if
>
> set objCurrNode = objCurrNode.firstChild
> for each objAttrib in objCurrNode.attributes
> if objAttrib.baseName = "Title" then
> strTitle = objAttrib.text
> end if
> if objAttrib.baseName = "Link" then
> strLink = objAttrib.text
> end if
> next
> if strCurrentCrumbTitle = strTitle then
> if objCurrNode.hasChildNodes() = true then
> for each objChild in objCurrNode.childNodes
> objCurrNode.removeChild objChild
> next
> end if
> for each objAttrib in objCurrNode.attributes
> if objAttrib.baseName = "Link" then
> objAttrib.text = strReqLink
> end if
> next
> strCrumb = strCrumb & strTitle
> exit do
> else
> strCrumb = strCrumb & _
> "<a href=""" & strLink & """>" & _
> strTitle & "</a>" & " > "
> if objCurrNode.hasChildNodes() = False then
> set objChild = _
> xmlDoc.createNode("element", "Page", "")
> set objAttrib = _
> xmlDoc.createAttribute("Title")
> objAttrib.text = strCurrentCrumbTitle
> set objAttrib = _
> objChild.attributes.setNamedItem( _
> objAttrib)
> set objAttrib = xmlDoc.createAttribute( _
> "Link")
> objAttrib.text = strReqLink
> set objAttrib = _
> objChild.attributes.setNamedItem( _
> objAttrib)
> set objChild = objCurrNode.appendChild( _
> objChild)
> strCrumb = strCrumb & strCurrentCrumbTitle
> exit do
> else
> 'Do nothing
> end if
> end if
> loop
> session("breadcrumbXML") = xmldoc.xml
> end if
>
> response.write strCrumb
> set xmlDoc = nothing
> set objCurrNode = nothing
> set objAttrib = nothing
> set objChild = nothing
> end function
> %>

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 11, 2007 Sep 11, 2007

Copy link to clipboard

Copied

Ok, I'm thinking that,perhaps, the session ends but the xml document
stays alive for as long as the browser is open. If the session expires,
I have it set to refresh to the home page. Unfortunately, that doesn't
seem to matter with this new issue. However, if the session expires,
could it be that the xml "session" is no longer in sink with the
session? I just don't know enough about how the server holds a temporary
xml document.

Any ideas / solutions welcome. Thanks.

Lee wrote:
> I left the page open over lunch and without changing anything, I hit
> refresh and suddenly, it's now operational. Anyone know what might cause
> it to hiccup like this?
>
> Lee wrote:
>> Microsoft VBScript runtime error '800a01a8'
>>
>> Object required: 'objCurrNode'
>>
>> /breadcrumb.inc, line 44
>>
>> It's still giving me the error above. Line 44 is
>>
>> set objCurrNode = objCurrNode.firstChild
>>
>> So, it appears that the "dynamic" xml is being dumped or emptied and
>> no longer has a node so it throws an error. How would I redirect if I
>> get an xml error?
>>
>> Thanks
>>
>>>> something like this
>>>>
>>>> if session('breadcrumbXML") = Null then
>>>> reponse.redirect("Home.asp")
>>>> end if
>>>>
>> The breadcrumb
>> <%
>> function writeBreadCrumb(strCurrentCrumbTitle)
>> Dim strCrumb
>> Dim strXMLCrumb
>> Dim xmlDoc
>> Dim objCurrNode
>> Dim objAttrib
>> Dim objChild
>> Dim strLink
>> Dim strTitle
>> Dim strReqLink
>> Dim redirected
>>
>> set xmlDoc = server.createObject("Microsoft.XMLDOM")
>> strXMLCrumb = session("breadcrumbXML")
>>
>> if session("breadcrumbXML") = Null then
>> response.redirect("index.asp")
>> end if
>>
>> 'Get currently requested page with variables
>> strReqLink = request.serverVariables("URL") & _
>> "?" & request.serverVariables("Query_String")
>> If strXMLCrumb = "" then
>> strCrumb = "<a href=""index.asp"">Home</a>" & _
>> " > "
>> strCrumb = strCrumb + strCurrentCrumbTitle
>> strXMLCrumb = "<Breadcrumb> " & vbcrlf & _
>> "<Page " & "Title=""" & _
>> strCurrentCrumbTitle & """ " & _
>> "Link=""" & strReqLink & """></Page>" & _
>> vbcrlf & "</Breadcrumb>"
>> session("breadcrumbXML") = strXMLCrumb
>> else mDummy = xmlDoc.loadXML(strXMLCrumb)
>> do
>> if strCrumb = "" then
>> strCrumb = _
>> "<a href=""index.asp"">Home</a>" & _
>> " > "
>> Set objCurrNode = xmlDoc.FirstChild
>> end if
>> set objCurrNode = objCurrNode.firstChild
>> for each objAttrib in objCurrNode.attributes
>> if objAttrib.baseName = "Title" then
>> strTitle = objAttrib.text
>> end if
>> if objAttrib.baseName = "Link" then
>> strLink = objAttrib.text
>> end if
>> next
>> if strCurrentCrumbTitle = strTitle then
>> if objCurrNode.hasChildNodes() = true then
>> for each objChild in objCurrNode.childNodes
>> objCurrNode.removeChild objChild
>> next
>> end if
>> for each objAttrib in objCurrNode.attributes
>> if objAttrib.baseName = "Link" then
>> objAttrib.text = strReqLink
>> end if next
>> strCrumb = strCrumb & strTitle
>> exit do
>> else
>> strCrumb = strCrumb & _
>> "<a href=""" & strLink & """>" & _
>> strTitle & "</a>" & " > "
>> if objCurrNode.hasChildNodes() = False then
>> set objChild = _
>> xmlDoc.createNode("element", "Page", "")
>> set objAttrib = _
>> xmlDoc.createAttribute("Title")
>> objAttrib.text = strCurrentCrumbTitle
>> set objAttrib = _
>> objChild.attributes.setNamedItem( _
>> objAttrib)
>> set objAttrib = xmlDoc.createAttribute( _
>> "Link")
>> objAttrib.text = strReqLink
>> set objAttrib = _
>> objChild.attributes.setNamedItem( _
>> objAttrib)
>> set objChild = objCurrNode.appendChild( _
>> objChild)
>> strCrumb = strCrumb & strCurrentCrumbTitle
>> exit do
>> else
>> 'Do nothing
>> end if end if
>> loop
>> session("breadcrumbXML") = xmldoc.xml
>> end if
>>
>> response.write strCrumb
>> set xmlDoc = nothing
>> set objCurrNode = nothing
>> set objAttrib = nothing
>> set objChild = nothing
>> end function
>> %>

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 11, 2007 Sep 11, 2007

Copy link to clipboard

Copied

LATEST
Ideas?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines