|
-
February 4th, 2000, 12:39 AM
#1
Pull variable from cgi server
I don't have much knowledge in VB but I want to beable to play with a variable that is pulled from a ".pl" file from the cgi-bin dir.
I have the output outputting an integer only value.
So far but don't work:
<script language="VBS">
Sub GetNum
Dim counter
counter = val("http://cgi.*********.com/cgi-bin/counter.pl")
msgbox(counter)
document.write("Visitors: " & Cstr(counter)) <--------- the Cstr is
definetaly
wrong anyway 
End Sub
-->
</script>
Please Help
Paul Goodyear
-
February 4th, 2000, 02:35 AM
#2
Re: Pull variable from cgi server
I would use the following approach:
- place an invisible IFRAME on your HTML form.
- load the .pl into that frame via document.frames["yourframe"].location.href = yoururl
- when the frame has been completely loaded get its contents via document.frames[..].body.innerText. This should return your counter value.
- assign it to a variable and write it to the document.
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
|