We help IT Professionals succeed at work.

Javascript Delphi Interface

Indefrei
Indefrei asked
on
Hi
i know that delphi is able to e.g. hook system messages etc.
js can't
so
I'd like to know if you can start from js a delphi prog to get some infos
and give them back to js

Example : Get  the click on this closing [X]

any idea ?
Indi
Comment
Watch Question

Commented:
Well, you could write an activeX object in Delphi that does it, then instantiate it from js.

GL
Mike
Richard QuadlingSenior Software Developer
CERTIFIED EXPERT

Commented:
Would this not work?

...

<a href="#" onClick="CallSomeFunction;">Click me for fun!</a>

This would call the function CallSomeFunction when the click is made.

You could try ...

<body onUnload="Closing">

which would be called when the current page is unloaded or the browser closed.

You won't be able to stop the browser closing, but you will be notified of it and can then open another one! (Very annoying this is too!).

Does this help?

Regards,

Richard Quadling.

Commented:
The problem is that CallSomeFunction can't be, say, createWindowEx or createCompatableBitmap or really any win32 api. The only functions you can call are those exposed by the language, it's native objects, and activeX objects it has access to.

GL
Mike

Author

Commented:
Hi,

sorry for the delay, but Ex-Ex...

Richard

in the example i meant the X of any prog
the plot of this q is the interface

Mike

i don't know nothing about activeX and how to use it.
Well,
i also heard some rumours about using CGI with Delphi instead
of PERL , is it possible to use the winapis there
and how ( Tutorials) ?

i just want to use Delphi within internetsites, but don't know
where to start

What would you suggest to learn easy and quickly ?

cheers
Indi
Commented:
Ah, well, if you're looking server side then your option expand.  You can def. call api's from a cgi. A delphi cgi is basically just an appliation that read from stdIN & writes to stdOut. www.borland.com has a couple of TI's on the subject, this one looked good: http://homepages.borland.com/aohlsson/Articles/CounterCGI.html


GL
Mike

Author

Commented:
Yeah,
gimme more

although i'd like to see more about the win2000 server side stories
cause of the really easy looking access database stuff and ASP,
i guess i can't ignore
the existance of all advantages of the linux server side stuff
(don't know much about it)

 would like to see more example refs, Mike

but anyway,
you'll get the points of course

go on
Indi

Author

Commented:
Here you are,

getting lazy ?

Commented:
Nah, just _really_ busy :). I work for a construction firm, we make concrete products & the weather 'round here is getting a little chilly..... Anywho - I'm off tomorrow & will have time to do some digging :). At any rate, thanks for the points & well see what can be done.

GL
Mike

Commented:
Out of curiosity, do you know/have you decide what httpd server you going to use? I'd assume that it'd prob. be either IIS or apache. for IIS it's prob easiest to write com objects that can be instantiated via ASP & .exe's for apache.

GL
Mike

Author

Commented:
Not yet,
it depends on what can be done with ASP for the use of Winapis
and on the other side with Delphi for the use of a database
(dbase, foxpro, access or is their only a sql server database, which i don't know yet)

You see its not easy to decide without enough kowledge

What i have to do is to build up some internetsites using a database updatebal by users
and getting some systeminfos of the users engine and little more..

what would you prefer to start with ?

Btw.
respectively to your busy times i declare this Q for closed after your next and last comment
thanks again and
cu
H a n d
Indi

Explore More ContentExplore courses, solutions, and other research materials related to this topic.