Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling a script

Status
Not open for further replies.

fergmj

Programmer
Feb 21, 2001
276
US
I have an index.html and I want to call a .cgi script when someone loads the index.html

I know in JavaScript, I can use the onLoad command and start a script. I want to know how when someone loads the index.html, the script will begin?

Thanks

Mindy
 
Call the script using an image tag, and have the script return a 1x1 pixel transparent gif, or call the script using an ssi exec tag and have the script return text. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
I am having no luck with this?

Can you type out an example?

Thanks

Mindy
 
If you need it, I've posted the code for a subroutine to print a 1x1 pixel transparent gif image without having to read it from a file in this forum before. Try searching for PrintPixel. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
LightElf (Programmer) Feb 17, 2002
1) <img src=&quot; height=1 width=1>

2) <!--#include virtual=&quot;/cgi-bin/myscript.pl&quot; -->

LightElf
this maybe a dum question but can I say include a VB scritp
useing this?
<!--#include file=&quot;modb.asp&quot; -->



<!-- mod.asp script -->
<% On Error Resume Next %>
<% If Handle=&quot;WarGod MA&quot; then
Response.write &quot;<b><font color='gold'>&quot;
end if %>
<!-- endmod.asp script -->


is how I would do it in VB or ASP how would I do this in perl?
I have a perl .pl file that looks like this

#new
$count = 0;
open (COUNT, '/user/chatuser.5020');
$count++ while (<COUNT>);
close(COUNT);


print &quot; <td align='center' valign='top' width='500'><a\n&quot;;
print &quot; href='print &quot;<font color=silver><font size=5>Council members ($count)</a>\n&quot;;

open (USERS, &quot;/user/chatuser.5020&quot;);
while (<USERS>) {
($ip,$name)=split(/:/,$_,2);
print &quot;<table><TR><TD>\n&quot;;
print &quot;<font size=4><FONT COLOR=Gold>\n&quot;;
print $name;
print &quot;</FONT>\n&quot;;
print &quot;</TD></TR></table>\n&quot;;
}
close(USERS);
print &quot;<br></a>\n&quot;;




#end row
I want to incude a file that will see the names in this file &quot;/user/chatuser.5020&quot;); all ready made by My other software and if a Name or membername is in that list print it on page lets say purple!

I have posted alot about this But i figure you can help here
 
You can't say inlcude file=, but that's what include virtual= is intended for. I don't know if it will work for a cgi program, that's what the exec is for. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top