Page 1 of 2

Hyperlinks throwing events? Possible?

Posted: Thu Jun 17, 2004 3:26 pm
by Karbon
I see a lot of applications using (assumed) webgadget type controls with hyperlinks that seem to send messages to the application itself. This would be a very hand interface tool for me, does anyone know how to do such a thing?

For instance, I would like to make a hyperlink that, when clicked, would send an event just like a button or any other gadget would...

Possible?

Posted: Thu Jun 17, 2004 3:34 pm
by freak
What about HyperLinkGadget() ?

Timo

Posted: Thu Jun 17, 2004 3:43 pm
by Karbon
I have a web page that includes a list of invoices (a report) - I'd like to create a hyperlink around the invoice number to trigger the invoice window to open. The report is HTML and displayed inside a webgadget.

Re: Hyperlinks throwing events? Possible?

Posted: Thu Jun 17, 2004 5:36 pm
by pbSync
Karbon wrote:
Possible?
Should be possible, for example BlitzPlus can do it. I also miss that feature in Purebasic. One quick but odd way is to take the code of the Atomic Webserver Example (or another server-example of purearea.net, don't know about the copywright of the atomic webserver), integrate it in your application and set the url of the webgadet to http://127.0.0.1 (your local IP-adress). This way you can retrieve all klicks in the webgadet and respond to it. Even Form-Handling should be possible. By the way: having a webserver-gadget in purebasic would be cool, also a high-level network-lib.

Posted: Thu Jun 17, 2004 5:55 pm
by Karbon
I don't need a server, I just need a hyperlink to trigger an event within the application. It is a pretty tall order I guess, but thought it might still be possible..

Posted: Thu Jun 17, 2004 7:34 pm
by Blade
I think it's possible too. Just Hit F3 in an Explorer window to search for a file (win2k)... It really looks like a HTML page!
When this will be possible, it will be possible even with a cool Flash interface!

So, someone please find a solution, thanks!!!!!! :wink:

Posted: Fri Jun 18, 2004 10:07 am
by pbSync
Karbon wrote:I don't need a server, I just need a hyperlink to trigger an event within the application. It is a pretty tall order I guess, but thought it might still be possible..
Another quick solution is to display your report with the html-control qhtm (http://www.gipsysoft.com/). It is a fast DLL and it can respond to a click on a link. it is free for noncommercial use.

Posted: Fri Jun 18, 2004 12:30 pm
by freak
It should be possible to do with the PB webgadget as well. I would love
to hack something together, but there is no time for that now
(damn those oral exams :evil: )

I might come up with something by the middle of next week...

Timo

Posted: Mon Jun 21, 2004 2:56 am
by Karbon
Wow - that library is pretty nice!

freak : I'd love to see it when you get time! Thanks!

Posted: Wed Jun 23, 2004 1:29 am
by Karbon
Has anyone used this library with PB?

Posted: Thu Jul 01, 2004 12:52 pm
by Karbon
Any luck on this front, freak?

Thanks!

Posted: Thu Jul 01, 2004 8:14 pm
by freak
I just returned from a little holiday, that's why i didn't answer for a while.

I almost have a working code now (still crashes at some point), but it
is quite big and messy. I am planning to put all that stuff together and
release an addon lib for the WebGadget. But once i've got a working code,
i'll post my first results.

I haven't forgotten it, don't worry :wink:

Timo

Posted: Thu Jul 01, 2004 8:38 pm
by Karbon
Didn't mean to be a nag.. I've had my hands in it too but haven't produced anything usable yet.. Thanks for keeping us posted!

Posted: Thu Jul 01, 2004 8:53 pm
by thefool
a very very buggy way would be having the app to check a file for its contents, and when changed do the action. Then have javascript to write to the file. I know this is very buggy, but maybe a possible thing..
But i hope freak comes up with something good.
By the way: having a webserver-gadget in purebasic would be cool
nope. i would not hope PB gets such things. Why not just download a free webserver from the internet instead?

The easy acces to low-level networking is a great advantage in PB. By the way, if you make a webserver yourself and program it up from the bottom, you can have more handling over it, and you feel more proud because you did it yourself. And it does not have to be very advanced. Look at Atomic Webserver. Its an excelent example, showing how to build a cool simple webserver.
But for mail handling, ex. pop3, its nice to have a lib. But that already exist as an excelent userlib. Its more difficult to handle pop3 than a simple webserver.
Just my oppinion though 8)

Posted: Sat Jul 10, 2004 6:26 am
by Karbon
Freak, did you ever get anywhere with this?

Thanks!