From: Evertjan. on
Rob Christiansen wrote on 19 mrt 2010 in comp.lang.javascript:

> I'm a bit confused. Yes, my code is ASP,

Answering on a previous posting always need quoting on Usenet.

> written in javascript, as
> opposed to VBscript or pearl or whatever. Am I dealing with the wrong
> newsgroup?

No, this is a good NG, however, for specific classic ASP Qs, better ask
them in:

news:microsoft.public.inetserver.asp.general

> I clicked on you guys cause I thought it said you specialized
> in 'javascript.'

"Clicked on"? please use a regular newsreader.

> But whatever, I really need your help. I change the contents of my
> variable (somevariable) with an <input type=text> statement
> and click submit.

<input type=text> is not a statement, but plain HTML.
You will need a <form> too.

If you are talking about a serverside variable, you will need to submit
the clientside information to the server first, and then fill that
veriable with the information.

> My change is up there in the ulr window (what's that called?)

"ulr window" please explain?
What change?

> but I can't access it. The book tells me just var somevariable =
> Request("variable");

Bad book!!
Never use default Request.
use:

var a = request.querystring('...');

or [better] use:

var a = request.form('...');

> - and then somevariable will hold the data thyat
> was stored in variable.

Eh? please read this again. What variable and what variable?

> SO SIMPLE, they say7 But all I get is undefined.

We cannot discuss that, as you do not show your code.

Try this:

========== test1.asp ==========
<%@LANGUAGE="JavaScript"%>
<%
var myVar = Request.form('myInfo');
Response.write('serverside myVar contains: ' + myVar );
%>

<hr>
<form method=post>
<input name='myInfo'><br>
<input type='submit'>
</form>
===============================

The first round ofcourse it will show "undefined",
the next time the inputted string, even if empty.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
From: Scott Sauyet on
On Mar 19, 4:42 pm, Rob Christiansen <robb_christian...(a)q.com> wrote:
> I'm a bit confused. Yes, my code is ASP, written in javascript, as
> opposed to VBscript or pearl or whatever. Am I dealing with the wrong
> newsgroup? I clicked on you guys cause I thought it said you specialized
> in 'javascript.'

I'm sorry, that was my fault. When I looked at your code, it looked
to me much more like VBScript than Javascript. I guess I've simply
never run across server-side JScript before, and I thought you were in
the wrong place.

This forum is appropriate for server-side JScript questions, although
most of the discussion here centers around client-side ECMAScript
implementations.

I'd like to make up for the confusion by offering some help;
unfortunately, I have nothing to offer. Good luck,

-- Scott
From: Tim Slattery on
"Evertjan." <exjxw.hannivoort(a)interxnl.net> wrote:

>
>var a = request.querystring('...');
>
>or [better] use:
>
>var a = request.form('...');

OP said that he saw his variable in the URL window (browser's address
line, I think). In that case he'll have to retrieve it from the
querystring collection. The Form collection has data that was POSTed.

--
Tim Slattery
Slattery_T(a)bls.gov
http://members.cox.net/slatteryt
From: Evertjan. on
Tim Slattery wrote on 22 mrt 2010 in comp.lang.javascript:

> "Evertjan." <exjxw.hannivoort(a)interxnl.net> wrote:
>
>>
>>var a = request.querystring('...');
>>
>>or [better] use:
>>
>>var a = request.form('...');
>
> OP said that he saw his variable in the URL window (browser's address
> line, I think). In that case he'll have to retrieve it from the
> querystring collection. The Form collection has data that was POSTed.

Even so, he could change that for the better.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
First  |  Prev  | 
Pages: 1 2 3
Prev: My Library Examples!
Next: window.print