How To Use SAJAX (AJAX Framework) from HTML Come usare SAJAX (AJAX quadro) da HTML
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.
Filed under Elencato sotto CMS Software CMS Software , Headline News Headline News , How To Come , Open Source Software Software open source , PHP , Pro Blogging Pro Blogging , Tech Note Nota tech , Web , Web Services Servizi Web , WordPress | |
| |
RSS 2.0 RSS 2,0 | |
Trackback this Article | questo articolo |
Email this Article Invia questo articolo
You may also like to read Si può anche leggere come |




January 14th, 2007 at 3:55 am 14 gennaio 2007 a 3:55 am
[...] There is a third and even simpler way to execute programs and display the results using AJAX. [...] Vi è una terza e ancor più semplice modo per eseguire programmi e visualizzare i risultati utilizzando la tecnologia AJAX. You can use any popular AJAX framework like Sajax or Prototype to make calls to the server and then display the results dynamically. È possibile utilizzare qualsiasi popolare AJAX quadro Sajax o come prototipo per effettuare chiamate al server e quindi visualizzare i risultati dinamicamente. This had the added advantage of being able to repeatedly update page contents. Ciò ha avuto il vantaggio di essere in grado di aggiornare ripetutamente il contenuto della pagina. [...]
September 9th, 2007 at 9:50 am 9 settembre 2007 a 9:50 am
Your site says “Remember to append the function names with x_.” In fact, in my experience the “x_” needs to be prepended, not appended. Il tuo sito dice: "Ricordati di aggiungere i nomi di funzioni con x_". Infatti, secondo la mia esperienza "x_" occorre anteporre, non figura in allegato.