Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
16
Erster Beitrag:
vor 4 Monaten
Letzter Beitrag:
vor 4 Monaten
Beteiligte Autoren:
André Labuschagné, Ericus, Allard

WB - Using External Javascript Components

Startbeitrag von André Labuschagné am 12.08.2017 18:18

Hi All

I am completely out of my depth here. I am trying to use an external javascript library. I have seen where to include all the header scripts. Now I am wanting to include statements in the body of the page. For example, I need to declare a div. Where do I do this?

I hope I have made myself clear.

Cheers
André

Antworten:

Hi Andre

What I did was just include an HTML control on the page and in the javascript code referred to the alias of that control i.e. A1.

It also depends on the type of control. The above worked for a Pivot control I tested but for ckeditor I used a multiline edit control.

Regards


Ericus Steyn

von Ericus - am 12.08.2017 18:41
Hi Eric

Thanks - I will try that now.

Cheers
André

von André Labuschagné - am 12.08.2017 20:04
Hi Ericus

Nah - that did not work. I do wish there was a good example showing how to do this. I need to be pointed to where I can insert extra code in the body of the html and so on.

Cheers
André

von André Labuschagné - am 12.08.2017 20:14
Hi Andre

It works with the HTML control on the page and the function in the example that Syncfusion uses (I assume that is the spreadsheet control you are referring to" should be changed to:

$(function () {
$('#A1').ejSpreadsheet();
});

Where A1 is the ID of the HTML control.

Regards

von Ericus - am 13.08.2017 14:42
Hi Eric

That is exactly what I am looking at. Will have a look at it right now and report back.

Cheers
André

von André Labuschagné - am 13.08.2017 16:22
Hi Ericus

That compiles and runs with no errors but the control does not display. The js files have been included.

Not sure where to put the code.

I have put it into onload JS and in the html code for the html control itself. Still does not display.

Any ideas?

Cheers
André

von André Labuschagné - am 13.08.2017 18:39
Hi Andre

In the Page Description in the Advance Tab in HTLM you add this to the page header:













Then in the onload event of the page I changed that from WL to JS and these are the only lines of code in there:

$(function () {
$('#A1').ejSpreadsheet();
});

Nothing in the HTML control. It is just resized to fill the page

No other code at all in the page.

Regards


Ericus

von Ericus - am 13.08.2017 19:40
Hi Ericus

Thanks a ton. I will give that a shot now.

Cheers
André

von André Labuschagné - am 13.08.2017 20:18
Hi Ericus

I have all that but the control does not display at all.

Cheers
André

von André Labuschagné - am 13.08.2017 21:07
Hi Ericus

Thanks a ton for all your help. It is displaying now. I have the general idea of how this all works.

Cheers
André

von André Labuschagné - am 13.08.2017 21:14
Hi Ericus

I am finding it to be quite slow but am investigating further.

There a few that I am looking at but have the general idea now how to included an external JavaScript library and/or component.

Cheers
André

von André Labuschagné - am 13.08.2017 22:59
Hi

Are you using webdev 22?

There is e new control that does it all. " The webcomponent control "


regards

allard

von Allard - am 16.08.2017 00:09
Hi Allard

No this is WB 19. I cannot take the risk of porting to WB 22 now.


Regards


Ericus Steyn

von Ericus - am 16.08.2017 19:38
Hi Allard

"Webcomponent control" sounds interesting.

WB19, 20 and 21 for testing. We have not upgraded to 22 yet. Far too risky at this stage.

Cheers
André

von André Labuschagné - am 16.08.2017 20:32
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.