Sajax is an useful ajax framework to simplify ajax based development for languages like PHP, Ruby etc. Not many realize Sajax can be used equally well from plain old html pages (as in .html or .htm). Sajax è un utile quadro ajax per semplificare lo sviluppo basato su ajax per linguaggi come PHP, Ruby, ecc Non molti realizzare Sajax può essere usato ugualmente bene da vecchi, semplici pagine html (come in. Html o. Htm). Their website doesn’t mention it anywhere so I can guess it was not one of their use cases. Il loro sito web non menziona in qualunque punto in modo che io possa indovinare non è stato uno dei casi il loro uso. However sajax is based upon ajax which is plain old Javascript. Tuttavia sajax si basa su ajax che è vecchio pianura Javascript. Let’s find out how we can use trusty old sajax to liven up your static pages. Let's scoprire come possiamo usare affidabile vecchia sajax a vivacizzare il tuo pagine statiche.

To use sajax from html you need to get the javascript code it generates and include it in your html pages. Per utilizzare sajax da HTML il necessario per ottenere il codice JavaScript che genera e inserirlo nel tuo codice HTML delle pagine.
Sajax doesn’t tell you how you can create a javascript file to include (in your html pages), thereby allowing you to call php (for example) function calls from client side javascript. Sajax non dice in che modo è possibile creare un file javascript di includere (in tue pagine HTML), consentendo così di chiamare php (per esempio) da chiamate di funzione javascript lato client. This can however be remedied with a simple call: Ciò può tuttavia essere risolto con una semplice telefonata:

This generates the required javascript file (change filename to your liking). Questo genera il file javascript necessario (cambia il nome del file a proprio piacimento). Include this file in your html pages and you are good to go. Includere questo file in tue pagine HTML e si sono buoni da fare. Now you can call your exported php function from javascript. Ora potete chiamare la funzione php esportati da javascript. Remember to append the function names with x_ . Ricordarsi di aggiungere i nomi di funzioni con x_.

How can you use it? Come si può utilizzarlo?
Check my Controllare il mio Annotated wordPress source code cross-reference Wordpress annotato il codice sorgente dei riferimenti incrociati site for an example. sito per un esempio. Check out the sajax based commenting system. Check out the sajax basata sistema di commento.

PS. As a side tip you should know sajax_init() function call is not required and can be eliminated with current versions of Sajax. Come un lato punta si dovrebbe sapere sajax_init () chiamata di funzione non è necessaria e può essere eliminato con le attuali versioni di Sajax. It does nothing. Essa non fa nulla.