Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
6
Erster Beitrag:
vor 3 Jahren, 1 Monat
Letzter Beitrag:
vor 3 Jahren
Beteiligte Autoren:
willy hermans, Fabrice Harari, Wouterke

Calling a Windev/Webdev function in HTML text

Startbeitrag von willy hermans am 03.06.2015 10:32

Hello,

Can I place this text into a EDT_HtmlText

Click Me!


Click Me!



Thanks,

Willy Hermans.

Antworten:

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

von willy hermans - am 03.06.2015 15:45
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

von Fabrice Harari - am 04.06.2015 12:36
Hello,

That looks very, very difficult.

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

Thanks for the effort.

Willy Hermans.

von willy hermans - am 04.06.2015 13:13
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

von Fabrice Harari - am 04.06.2015 14:09
Dont know about windev

but for webdev you can also use javascript to run code of a button
([*]=..Alias property of the controls)
use an Edit[A1] for param string
BTN_Code[A2] -> parses string and determins what to do with it

[button type="button onclick ="A1='RunProcedure1@WithVal1'';A2.click()" ]Click Me![/button]

Not 100% on the JS might have made syntax error there but the concept should work.

oh ye and dont forget HTML can be editet in the browser.
So make sure the button doesnt just run whatever but only the code you want it to.

von Wouterke - am 01.07.2015 15:21
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.