From: Rob Christiansen on
this script takes input via an INPUT statement and INSERT INTO a file.
It's supposed to, that is. The data is there in the URL window,
"sname=joeblow" ...

(http://ccs2468.com/santa/santatry.asp?sshow=5&spassword=___&sname=joebl
ow&smessage=15&sclient=15&sa=15&sb=15&sc=15&sd=15&se=15&sf=15&sg=15&sh=1
5&sj=15&sk=15&sL=15&sm=15&sN=15)

... but I can't seem to access it. I believe I have to use the
Request.QueryString("sname"); command. I am a total novice when it comes
to this. Please show me how.

var sname = String( Request( "sname" ) )
var snewbuyer = String( Request( "sname" ) )

GUTS REMOVED

<form method="post" action= "<% = this_script_url %>" >
<table>

GUTS REMOVED


<tr>
<td>Santa name:</td>
<td><input TYPE=text name="sname" value= <%Response.Write( newbuyer ) %>
size=15></td>
</tr>

<input type="submit" value="Add New">
<input type="reset" value="Cancel">
</form>
<%

snewbuyer = Request.QueryString("sname"); //

SQL = "INSERT INTO santa1 VALUES ( "+ newid +", "+ prevrecnum +", "+
nextrecnum +", '"+ fcolor +"', '"+ bcolor +"', '"+ newshow +"', '"+
newpassword +"', '"+ snewbuyer +"', '"+ newmessage +"', '"+ newclient
+"', '"+ newa +"', '"+ newb +"', '"+ newc +"', '"+ newd +"', '"+ newe
+"', '"+ newf +"', '"+ newg +"', '"+ newh +"', '"+ newj +"', '"+ newk
+"', '"+ newL +"', '"+ newm +"', '"+ newN +"' )";
//
Response.Write( "SQL = "+ SQL +"<br>" ); //newbuyer
//Response.End();
ConnectionObject.Execute( SQL );


SQL = "UPDATE santa1 SET sname = '"+ snewbuyer +"' WHERE id = "+ 4;
//'"+ Response.Write( "SQL = "+ SQL +"<br>" ); //Response.End();
ConnectionObject.Execute( SQL );



crazyswede

*** Sent via Developersdex http://www.developersdex.com ***
From: Scott Sauyet on
On Mar 17, 4:23 pm, Rob Christiansen <robb_christian...(a)q.com> wrote:
> this script takes input via an INPUT statement and INSERT INTO a file.

As far as I can tell, this has nothing to do with Javascript. If I'm
wrong, can you please tell me how.

From looking at the code supplied, I'm guessing that you're using
ASP. You might find some answers on an ASP forum.

Good luck,

-- Scott
From: Andrew Poulos on
On 18/03/2010 7:23 AM, Rob Christiansen wrote:
> this script takes input via an INPUT statement and INSERT INTO a file.
> It's supposed to, that is. The data is there in the URL window,
> "sname=joeblow" ...
>
> (http://ccs2468.com/santa/santatry.asp?sshow=5&spassword=___&sname=joebl
> ow&smessage=15&sclient=15&sa=15&sb=15&sc=15&sd=15&se=15&sf=15&sg=15&sh=1
> 5&sj=15&sk=15&sL=15&sm=15&sN=15)
>
> .. but I can't seem to access it. I believe I have to use the
> Request.QueryString("sname"); command. I am a total novice when it comes
> to this. Please show me how.
>
> var sname = String( Request( "sname" ) )
> var snewbuyer = String( Request( "sname" ) )

Yes it should be Request.QueryString("sname")

> GUTS REMOVED
>
> <form method="post" action= "<% = this_script_url %>">

I don't think a space is permitted between <% and =.

Andrew Poulos
From: Evertjan. on
Scott Sauyet wrote on 18 mrt 2010 in comp.lang.javascript:

> On Mar 17, 4:23�pm, Rob Christiansen <robb_christian...(a)q.com> wrote:
>> this script takes input via an INPUT statement and INSERT INTO a file.
>
> As far as I can tell, this has nothing to do with Javascript. If I'm
> wrong, can you please tell me how.

Wat nonsense. [Or maybe not, I don't know how far you can tell]

ASP is not a language, just a platform.
Javascript can use that platform just as well as vbscript.

Javascript, depending on your skills, can be even beter than VBS on ASP.

> From looking at the code supplied, I'm guessing that you're using
> ASP. You might find some answers on an ASP forum.

So it can have everything to do with Javascript.

If we allow DOM access in this NG,
there is no reason to exclude javascript IIS commands.

I agree with you [I hope], that the OP must be made clear
not to confuse clientside javascript with serveerside javascript.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
From: Scott Sauyet on
Evertjan. wrote:
> Scott Sauyet wrote
>> Rob Christiansen wrote:
>>> this script takes input via an INPUT statement and INSERT INTO a file.
>
>> As far as I can tell, this has nothing to do with Javascript.  If I'm
>> wrong, can you please tell me how.
>
> Wat nonsense. [Or maybe not, I don't know how far you can tell]

Perhaps not very far! :-(


> ASP is not a language, just a platform.
> Javascript can use that platform just as well as vbscript.

It's been years since I touched ASP. I'd forgotten that you could
even use JS inside it.

Still, the code supplied looks like VBScript to me. I suppose it's
not necessarily possible to tell, but all those initial capital
letters make me suspicious. Is the following in fact actually JS?

| var sname = String( Request( "sname" ) )
| var snewbuyer = String( Request( "sname" ) )
| // [ ... ]
| SQL = "INSERT INTO santa1 VALUES ' // ...
| Response.Write( "SQL = "+ SQL +"<br>" ); //newbuyer
| //Response.End();
| ConnectionObject.Execute( SQL );

-- Scott
 |  Next  |  Last
Pages: 1 2 3
Prev: My Library Examples!
Next: window.print