Re: AJAX with SBBS
By: Mortifis to All on Fri Apr 10 2020 18:28:11
I was curious if the SBBS Web Server can handle AJAX; I believe is does xml
with the xjs parser?
Technically all Synchronet JS (including XJS/SSJS) does have some special XML-handling features. This come from an old JS extension called E4X:
https://developer.mozilla.org/en-US/docs/Archive/Web/E4X
However, it can be a pain to work with, and you probably don't *need* XML.
It's a lot more straightforward to just pass JSON between the server and the client. An SSJS on the server only needs to respond with some stringified JSON, and the client just needs to JSON.parse it.
On the browser-side, you can use XMLHttpRequest, or the Fetch API, or various client-side JS frameworks to make the requests.
---
echicken
electronic chicken bbs - bbs.electronicchicken.com
þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com