Running UDT with Javascript

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
WDJames
Forum Members
Forum Members
Posts: 64
Joined: Tue Feb 13, 2018 1:09 pm

Running UDT with Javascript

Post by WDJames »

Hi all,

I have a CGBF booking form that queries the database for remaining spaces which is stored in a LISE item. I am able to get the value when loading the page but I need to intermittently query the database(every 1 minute) for the remaining spaces to avoid overbooking. I have a UDT that returns a value from the database which is then displayed on the page. After the page is loaded, is there any way to intermittently run the UDT using Javascript/AJAX?

Any help is appreciated.

Thanks in advance,

James
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3483
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Running UDT with Javascript

Post by velden »

Simple solution would be to create a hidden page, put the UDT tag in the default content and then use ajax to call the page with (extra) query parameter:

Code: Select all

showtemplate=false
You probably will have to take care of the mime type which is used to return the data. That should be possible from within the UDT.
Post Reply

Return to “Modules/Add-Ons”