Page 1 of 1

Running UDT with Javascript

Posted: Fri May 12, 2023 9:15 pm
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

Re: Running UDT with Javascript

Posted: Thu Jun 15, 2023 3:15 pm
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.