Excute CGI onLoad

Hi,

I made a small (Text-Based) Counter using Delphi cgi ..

Please tell me How I excute it in my index.htm file .. is there a special HTML tag or what ??!!!

Note : I Want to get TEXT-BASED Counter
MrNetAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DragonSlayerCommented:
what does the counter return?  (I mean in what format and WHAT...)
0
simonetCommented:
A graphical counter would be easier to add to the page.

If you want, I have the source for a graphical CGI counter, made in Delphi, and the source to add it to the page.

Alex
0
MrNetAuthor Commented:
DragonSlayer,
the counter return PLAIN-TEXT number .. I should use HTML tags to decorate it like :
<font color="red"><#COUNTER></font>
but that could't run in TEXT-Counters.


simonet,
Actually I have an old Graphical if you can send me the source for your counter I will be happy ..

my EMail: MrNet10@hotmail.com

0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

RadlerCommented:
Hi MrNet;

I made this recently;

The tag is like this

< IMG = "http://??????/?????/YourCounter.DLL?Parm1=?&Param2=??" >


At your dll put the method to get and read the values to better process.
with Response do:
1 - Save a JPG image to a stream set the position to 0
2 - Do response.ContentStream:=stream
3 -Call Response.SendResponse.

Warning dont call Streamer.Free before afterDispacth.

If necessary a snap of code

      try
            //Pega nome do contador
            CounterName:=Request.QueryFields.Values[ 'countername' ];
            if CounterName = EmptyStr then begin
                  SendErrorImg( Response );
                  Exit;
            end;

            //Checa se ha setvalue ##alteraca do valor
            if Request.QueryFields.Values[ 'set' ] <> EmptyStr then begin
                  try
                        CountID:=StrToInt( Request.QueryFields.Values[ 'set' ] );
                  except
                        SendErrorImg( Response );
                        Exit; //Cancela atualizacao
                  end;
                  Self.SetCountValue( CounterName , CountID )
            end;

            //Pega valor apos ter incrementado anterior
            CountID:=ProcessCountID( CounterName );
            if CountID <> 0 then begin
                  Img:=TJPEGImage.Create;
                  try
                        Self.GetNumberImg( CountId, Img );
                        Strm:=TMemoryStream.Create;
                        try
                              Img.SaveToStream( Strm );
                              Strm.Position:=0;
                              Response.ContentType:='image/jpeg';
                              Response.ContentStream:=Strm;
                              Response.SendResponse;
                        finally
                              //Nao liberar o streamer aqui isso sera feito apos dispatch !!!!!!!!!!!!!
                        end;
                  finally
                        Img.Free;
                  end;
            end else begin
                  //Falha no processo deve ser informada com grafico correlato
                  Self.SendErrorImg( Response );
            end;
      finally
            Handled:=True;
      end;
end;

the comments in portuguese, sorry.

T++, Radler.
0
RadlerCommented:
MrNet;

Sorry again;
I stay empolged and send to a image based case.
And again and again, I don't see the Simonet comment.

T++, Radler.
0
MrNetAuthor Commented:
Thanx Radler,

but I asked about another thing.


Pls .. if you know, try help me.

0
HamidHossainCommented:
That is impossible
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.