How to return a value from an ASP page

  • Thread starter Wendell Buckner
  • Start date
W

Wendell Buckner

Can I do something like this:


var aResult = new Array();
aResult = window.showModalDialog("SqnInq2.Asp?sBank=" + 01 + "&sCity=" + 1
+ "&sAcno=" + sAccount,window,sFeatures);


If so what would the ASP code look like that would return the array?

(maybe something like this?)

<%
..
..
..
dim SigStatus(1)
SigStatus(0) = iResp
SigStatus(1) = 0
response.write ("window.returnvalue = SigStatus")

%>

I've very confused about this...
 
B

Bob Barrows [MVP]

There is no ASP code involved when using modal dialogs. The basic idea is to
have the modal dialog call a callback function in the calling page to return
the data. For more details, go to a client-side code group:
..scripting.jscript is one of them.

Bob Barrows
 
W

Wendell Buckner

Thanks for the response. My group developed some ASP code for a customer
that will return a page of account/signer information from out database
(this is for a bank). The code my group developed is ALL ASP code. The
customer wants our code to interface with their code. They insist that we
return some data and they don't want it returned through session variables.
They suggested we return. They suggested returning it through
"window.showModalDialog". As you are suggesting, this will not work(I didn't
think it would either)... How can one return values from ASP page w/o using
session variables.
 
B

Bob Barrows

Wendell said:
Thanks for the response. My group developed some ASP code for a
customer that will return a page of account/signer information from
out database (this is for a bank). The code my group developed is ALL
ASP code. The customer wants our code to interface with their code.
They insist that we return some data and they don't want it returned
through session variables. They suggested we return. They suggested
returning it through "window.showModalDialog". As you are suggesting,
this will not work(I didn't think it would either)... How can one
return values from ASP page w/o using session variables.

By using the Response object.
By embedding the values in the querystring of a page to which you are
redirecting.

Bob Barrows
 
W

Wendell Buckner

Again thanks.... As you detected I wasn't clear on the options you provided.
My preference was by using the response object. Can you provide examples of
both? Or do you know of a web site where I can see examples of both... I
appreciate your help... I been having a hard time finding this on the web so
far via google searches and such...
 
B

Bob Barrows [MVP]

Response.Write "value to be returned"

or

Response.redirect "somepage.asp?retval=" & _
server.urlencode("value to be returned")

Bob Barrows
 

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

No members online now.

Forum statistics

Threads
474,146
Messages
2,570,832
Members
47,374
Latest member
EmeliaBryc

Latest Threads

Top