PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Calling a Windev/Webdev function in HTML text
Calling a Windev/Webdev function in HTML text
Iniciado por guest, 03,jun. 2015 12:32 - 4 respuestas
Publicado el 03,junio 2015 - 12:32
Hello,

Can I place this text into a EDT_HtmlText

Click Me!


Click Me!



Thanks,

Willy Hermans.
Publicado el 03,junio 2015 - 17:45
Hello,

Oops, I just saw that my topic was not displayed as it should. There was some HTML text in it. Maybe HTML in HTML is not displayed perfect.

So I just replaced the < and > in the tags with [ and ]

[button type="button onclick = alert( 'Hello world!') ]Click Me![/button]

[button type="button onclick = MyWinDefOrWebDevFunc(MyParameter') ]EditRecord[/button]

Now the question again.

Is it possible to display a HTML text in a Webdevsite and in a WinDev application with a button that calls a page or window with a specific parameter.

So can I generate an HTML text in a left panel and display the content of a record in a right panel depending of the HTML linl in the left panel.

I hope the complete message is displayed now.

Thanks,
Willy Hermans
Publicado el 04,junio 2015 - 14:36
Hi Willy

directly calling a wlanguage function, as you seem to suggest, I don't think so...

However, there are ways to achieve this behavior, but it's a little more complicated than that, and completely differently done in webdev and windev...

Let's start with webdev:
that's normal html behavior, as long as you have an iFrame on the right side, and you display separate pages in it... in that case, your link code will be a direct url to that page (static or awp) including the fact that the page is displayed in iFrame xxxx

Now, for windev, it's a little more complicated than that... It is possible to tell html that there's a new sheriff in town... It's what (by example) skype is doing by offering it's CALLTO:phonenumber type of url/link... basically you have to write somewhere in the system (I suppose in the registry) that a link of type MyApp: should call this specific exe with the remaining of the url in the command line...

At that point, here is what shouldbe happening for you:
- you exe is running and displaying the html
- the user clicks on a link made like so: MyApp:StringTellingMeWhatToDo
- the html field knows to call a specific exe on disk (because you modified the registry)
- this exe is tarted with StringTellingMeWhatToDo in the command line
- this exe TELLS your already active exe what to do
- your exe receives the information and dos what is needed

Hope this help

Best regards
Publicado el 04,junio 2015 - 15:13
Hello,

That looks very, very difficult.

I will rethink it over and hope to find another solution.

Thanks for the effort.

Willy Hermans.
Publicado el 04,junio 2015 - 16:09
Hi Willy,

I wouldn't call it very difficult, just complex

As for other solutions, it seems to me that, as long as you want to start from a "free-hand" text, you will always have a complex solution on your hands

If you can user a looper instead, it becomes simple, but you wont have the same look in your left column...

Another thing that you can also do (for windev) is to analyse what's under the cursor when you click, and depending on the text you find, do whatever you want... the complexity is then moved to analyzing the content

Best regards