This topic is locked

Add Foldable Section not working

8/5/2009 7:12:46 PM
ASPRunnerPro General questions
R
RBrogen author

I copied the code directly from the 6.1 manual and pasted into my project and I get 500 - Internal server error. Any advice on what would cause this is greatly appreciated.
I put this in my Add Page:
<b><a href="#" id="handle1" onclick="toggle('1')">Show</a></b>
<div id="content1" style="display:none">
<P>Put your text here.</P>
</div>
I put this in my Add Page Before Display event
Set body = CreateDictionary()
body = xt.xt_vars("body")
body("end") = body("end") & "<script>function toggle(id)"
body("end") = body("end") & "{if (document.getElementById('content'+id).style.display == 'none') {"
body("end") = body("end") & "document.getElementById('content'+id).style.display = 'block';"
body("end") = body("end") & "document.getElementById('handle'+id).innerHTML = 'Hide';"
body("end") = body("end") & "} else {"
body("end") = body("end") & "document.getElementById('content'+id).style.display = 'none';"
body("end") = body("end") & "document.getElementById('handle'+id).innerHTML = 'Show';"
body("end") = body("end") & "}}</script>"
xt.assignbyref "body",body

J
Jane 8/7/2009

Hi,
to say what's happening I need the original error message.

IE hides error message and show its own.

You should go to the Tools --> Internet Options --> Advanced in the IE (Internet Explorer) and uncheck "Show friendly HTTP error messages" option.

Then reproduce your error and post full error message.

J
John 8/10/2009

Sorry to jump in but here is what I am receiving with IE and the same sample code.
Error Type:

Microsoft VBScript runtime (0x800A01C2)

Wrong number of arguments or invalid property assignment: 'Body'

/Folding Sections/include/dummytable_events.asp, line 36
Browser Type:

Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.590; .NET CLR 1.1.4322; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; OfficeLiveConnector.1.3; OfficeLivePatch.0.0)
Page:

GET /Folding Sections/dummytable_add.asp
Pls advise
John

J
Jane 8/11/2009

John,
Please publish your project on Demo Account and open a ticket at http://support.xlinesoft.com sending a URL to your pages along with instructions on reproducing this error.

J
John 8/12/2009

I posted the application but by removing the following statement the folding section worked.
body = xt.xt_vars("body")
Please advise
John

J
Jane 8/13/2009

John,
please send link to your application to support@xlinesoft.com.

J
Jane 8/14/2009

Hi,
there is no xt_vars method in ASPRunnerPro 6.1.

Just remove this line in your code:

body = xt.xt_vars("body")


We'll update Help file.