|
-
Oct 28th, 2000, 06:08 AM
#1
Thread Starter
Addicted Member
Hi there everyone.
I've had a thought - I want to use an ASP script to produce a string response that can be fed into a client browser and interpreted there. For example:
Code:
<script language="vbscript">
Whatever = "http://www.host.com/script.asp?variable=value"
Document.write "The script returned "& Whatever &" as a response."
</script>
Obviously this won't work, but would someone please help me grab a response from an ASP script and put it in a normal HTML file (where it can be played about with and interpreted in different ways). I hope you understand this because I'm not sure I do
-
Oct 30th, 2000, 03:25 AM
#2
Well, you are right.... I don't really know what you are looking for.
If it's something like building the querystring to go to a page, and then redirect it to a page, then that goes something like this (in ASP code) :
-----------------------------------------------
dim strWhereTo
strWhereTo = "http://www.host.com?"
if Option1 then strWhereTo = strWhereTo & "option1=value1&"
if Option2 then strWhereTo = strWhereTo & "option2=value2&"
strWhereTo = left(strWhereTo, len(strWhereTo) - 1)
response.redirect strWhereTo
-----------------------------------------------
If that was not what you meant to ask, then please re-formulate the question in a clearer way.
-
Oct 30th, 2000, 11:33 AM
#3
Frenzied Member
any help?
Code:
<%
response.write "<script language=javascript>" & vbcrlf
response.write "document.write('The script returned <b>' + document.location + '</b> as a response');"
response.write "</script>" & vbcrlf
%>
-
Oct 30th, 2000, 01:12 PM
#4
Thread Starter
Addicted Member
I appreciate what you've tried but it's not really what I'm looking for. Here's another go at explaining it:
In an ASP script, I open a text file on the server, which gives me a number (it's for a hit counter service), let's say "354".
I want some way for this number to be put on a users page, where I can fiddle about with it like
Code:
For a = 1 to Len(thenumberofhits)
Document.write "<IMG SRC='"& Mid(thenumberofhits, 1,1) & ".gif'>
next a
That way, individual digits of the hit counter are written to a users page. If this is not possible, could someone tell me how to get an ASP script to return a binary image file so I can link it like
<IMG src="http://www.server.com/script.asp?account=robert">
And it will display the graphical hit counter. I know how to do a text based one (http://www.xenonic.com) but I need to do a graphical one, responding to users requests. Any clearer?
-
Oct 31st, 2000, 02:45 AM
#5
In my opinion what you just wrote yourself should work. At least when you have the right path where the image is stored.
So have you tried your way? And if so, and it failed, what was the error message?
-
Oct 31st, 2000, 01:06 PM
#6
Thread Starter
Addicted Member
Well yes - the code would work. But I still need to get the value for "thenumberofhits".
I want the ASP script to return this "thenumberofhits" to the client browser. This would be fine if the page was an ASP page, but it's a hit counter, so I need to get the value remotely.
Get it?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|