• AJAX with SBBS

    From Mortifis@1:229/2 to All on Friday, April 10, 2020 18:28:11
    From: mortifis@ALLEYCAT.remove-eos-this

    I was curious if the SBBS Web Server can handle AJAX; I believe is does xml with the xjs parser?

    ---
    þ Synchronet þ AlleyCat! BBS Lake Echo, NS Canada
    --- Synchronet 3.18a-Win32 NewsLink 1.112
    * Vertrauen - Riverside County, California - telnet://vert.synchro.net

    --- SoupGate-Win32 v1.05
    * Origin: www.darkrealms.ca (1:229/2)
  • From echicken@1:229/2 to All on Friday, April 10, 2020 23:20:56
    From: echicken@ECBBS.remove-y1a-this

    To: Mortifis
    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
    --- Synchronet 3.18a-Win32 NewsLink 1.112
    * Vertrauen - Riverside County, California - telnet://vert.synchro.net

    --- SoupGate-Win32 v1.05
    * Origin: www.darkrealms.ca (1:229/2)
  • From Rampage@1:229/2 to All on Saturday, April 11, 2020 08:33:14
    From: rampage@SESTAR.remove-u4b-this

    To: echicken
    Re: AJAX with SBBS
    By: echicken to Mortifis on Fri Apr 10 2020 23:20:56


    echicken> It's a lot more straightforward to just pass JSON between the
    echicken> server and the client. An SSJS on the server only needs to
    echicken> respond with some stringified JSON, and the client just needs
    echicken> to JSON.parse it.

    oooooohhhh... this gives me an idea... the flightgear simulator can send JSON for html queries... i use it for a simple python script to pull the data for AI
    craft when i have FG running so i can see where craft are and their departure/arrival airports
    and similar data...

    the cool(?) idea i just had is to have a section in the BBS that works kinda like the interbbs messages thing where it polls FG occasionally, pulls the data
    and formats it for display in similar fashion to the interbbs message thing... read-only to start
    with as a type of monitor but imagine controlling an AI in the simulator via text instructions from a BBS ;)

    where's geneb? he's another FGer that might have some ideas in this vein -=B-)


    )\/(ark

    ---
    þ Synchronet þ The SouthEast Star Mail HUB - SESTAR
    --- Synchronet 3.18a-Win32 NewsLink 1.112
    * Vertrauen - Riverside County, California - telnet://vert.synchro.net

    --- SoupGate-Win32 v1.05
    * Origin: www.darkrealms.ca (1:229/2)