|
 |
asp_web_howto thread: asp variable in sql statement using javascript
Message #1 by "Jimenez, Sonny (S)" <SJimenez3@d...> on Mon, 19 Feb 2001 12:51:33 -0500
|
|
hello my fellow programmers,
I have a little problem with Javascript, it doesn't like me very much,
ahhaahh!
Can someone help me retrieve a querystring value from a url using js.
my querystring looks like this now.
http://ddcd.intranet.dow.com/Feedback/tools/toolinfo.asp?toolname=upload
<http://ddcd.intranet.dow.com/Feedback/tools/toolinfo.asp?toolname=upload>
my sql looks like this now
cmdTmp.CommandText = 'select * from SpecialtyTools where ToolName = +' + "'"
+qtoolname+"'";
If anyone can help that would be cool!
Thanks in advance and Welcome in a far advance! hahahahaha :) Smile we
have the best job in the universe,
... urrrrrrrrrrgggggggggghhhhhhhh!
Message #2 by Imar Spaanjaars <Imar@S...> on Mon, 19 Feb 2001 19:18:19 +0100
|
|
I think you need to use Request.QueryString
var toolname;
toolname = Request.QueryString("toolname")
Or did I just completely misunderstand you.
Imar
At 12:51 PM 2/19/2001 -0500, you wrote:
>hello my fellow programmers,
>
>I have a little problem with Javascript, it doesn't like me very much,
>ahhaahh!
>Can someone help me retrieve a querystring value from a url using js.
>
>my querystring looks like this now.
>
>http://ddcd.intranet.dow.com/Feedback/tools/toolinfo.asp?toolname=upload
><http://ddcd.intranet.dow.com/Feedback/tools/toolinfo.asp?toolname=upload>
>
>my sql looks like this now
>
>cmdTmp.CommandText = 'select * from SpecialtyTools where ToolName = +' + "'"
>+qtoolname+"'";
>
>If anyone can help that would be cool!
>
>Thanks in advance and Welcome in a far advance! hahahahaha :) Smile we
>have the best job in the universe,
>
>... urrrrrrrrrrgggggggggghhhhhhhh!
Message #3 by "Jimenez, Sonny (S)" <SJimenez3@d...> on Mon, 19 Feb 2001 13:21:00 -0500
|
|
No your right, thanks a lot, I'm just a big ol dope, excuse my dopiness!
Hahahah!
Thanks,
Sonny Jimenez
Message #4 by "Jimenez, Sonny (S)" <SJimenez3@d...> on Mon, 19 Feb 2001 13:18:54 -0500
|
|
I think the syntax may be different using javascript though?
Message #5 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Tue, 20 Feb 2001 10:22:06 -0000
|
|
are you doing this on the server or client? (presumably on the server as you
are creating a SQL string)
if on the server then syntax will be the same
if on the client then you can get what follows the ? in the URL from
document.location.search
-----Original Message-----
From: Jimenez, Sonny (S) [mailto:SJimenez3@d...]
Sent: Monday, February 19, 2001 6:19 PM
To: ASP Web HowTo
Subject: [asp_web_howto] Re: asp variable in sql statement using javas
cript
I think the syntax may be different using javascript though?
________________________________________________________________________
Scottish Enterprise Network
http://www.scottish-enterprise.com
|
|
 |