Modules - WebDNA AJAX module

Use WebDNA to simplify AJAX functionality on your pages

numero = 314
interpreted = N
texte = With Ajax, you can exchange data with your server asynchronously (in the background) without reloading the page. JavaScript and the XMLHttpRequest object are at the core of ajax, and this module tucks them away in a function, giving you a much neater way to code your pages. These three modules give you the basis for customizing to your own needs. Each take three variables: one to call the specific function, one to specify the WebDNA page used in the background, and one to specify the spot on the page to display the results. The background WebDNA page contains WebDNA code, and the html that is parsed, then displayed. The three modules are: ajaxBasicQuery, which sends a single variable to the specified WebDNA page where you perform WebDNA magic. AJAX returns the parsed page in the DIV section for viewing. This could be a single record or a list of many records. The example here only retrieves the data, but you could do anything else, such as add, change or delete data. ajaxDBEntry, which sends multiple variables to the specified WebDNA page where data is written to your database. AJAX returns the parsed page in the DIV section below, confirming your added record, and showing the five before that. No need to reload the page; just keep adding records. This module shows how to send multiple variables, and how to handle them on the WebDNA page. ajaxSuggest, which sends a variable to the specified WebDNA page where you search for records, possibly returning several that match. The list of returned data displays as a drop down list, and the user clicks one of them to autocomplete the text field.
Get the Module

Some things you learn: - [autonumber] and [lastautonumber] to retrieve the record you just added - <button> for making a submit button that doesn't reload the page - How to construct a string of form values using javascript, and [listwords] to unravel it and turn it into individual WebDNA variables.

With Ajax, you can exchange data with your server asynchronously (in the background) without reloading the page. JavaScript and the XMLHttpRequest object are at the core of ajax, and this module tucks them away in a function, giving you a much neater way to code your pages. These three modules give you the basis for customizing to your own needs. Each take three variables: one to call the specific function, one to specify the WebDNA page used in the background, and one to specify the spot on the page to display the results. The background WebDNA page contains WebDNA code, and the html that is parsed, then displayed.

The three modules are:

ajaxBasicQuery, which sends a single variable to the specified WebDNA page where you perform WebDNA magic. AJAX returns the parsed page in the DIV section for viewing. This could be a single record or a list of many records. The example here only retrieves the data, but you could do anything else, such as add, change or delete data.

ajaxDBEntry, which sends multiple variables to the specified WebDNA page where data is written to your database. AJAX returns the parsed page in the DIV section below, confirming your added record, and showing the five before that. No need to reload the page; just keep adding records. This module shows how to send multiple variables, and how to handle them on the WebDNA page.

ajaxSuggest, which sends a variable to the specified WebDNA page where you search for records, possibly returning several that match. The list of returned data displays as a drop down list, and the user clicks one of them to autocomplete the text field.

Get the Module


Some things you learn:

- [autonumber] and [lastautonumber] to retrieve the record you just added
- <button> for making a submit button that doesn't reload the page
- How to construct a string of form values using javascript, and [listwords] to unravel it and turn it into individual WebDNA variables.


Terry Wilson

DOWNLOAD WEBDNA NOW!

Top Articles:

[biotype]

BioType is a behavioral biometrics WebDNA function based on ADGS research and development (from version 8...

F.A.Q

A compilation of some user's questions...

Tips and Tricks

A list of user-submitted tips ...

AWS Raw WebDNA LAMP-Plus WebServer

Amazon Web Services (AWS) README for Machine Image ID...

WebDNA Libraries

A list of available libraries for WebDNA...

Technical Change History

This Technical Change History provides a reverse chronological list of WebDNA changes...

Related Readings:

WebDNA AJAX File Uploader Module

This module allows upload through a drag and drop action...

WebDNA Upload Module

It is easy to upload files using WebDNA!...

WebDNA AJAX module

Use WebDNA to simplify AJAX functionality on your pages...

WebDNA AJAX File Uploader Module

This module allows upload through a drag and drop action...

ImageMagick WebDNA module

ImageMagick is a must-have for sites uploading and managing images...