Testimonials Minimize
I have to tell you, XMOD is making me a hero at my job - people are amazed at how quickly I can give them access to post information on our website, and how easy it is!
acomes via our forums
  
spacer
AJAX Form Demonstration (XMod 4.3) Minimize

XMod 4.3 Gets Support for AJAX

AJAX is a catch-all term for the technology that enables Javascript to request data from the web server and insert it into the page (or otherwise process the data) - all without refreshing the whole page. In other words, it combines the immediacy of a Javascript-based client-side solution with the ability to retrieve and work with data on the server.

XMod's new AJAX tags make this process a lot simpler by handling the plumbing behind the scenes. The form below is just one example of an AJAX-based solution. Whenever you select a city from the drop-down list, the form requests a web page from the server for that city and inserts its contents into this page - all without a postback.

View Landmark Info For:
 
Images are courtesy of the USGS and supplied by Terraserver-USA.com

Code Snippet
Aside from the styling, the code is pretty simple. It uses the <ajax> tag and adds a Javascript function call to the drop-down list control's onchange event. The code that makes this example work is highlighted in red.

<ajax ref="ajaxLandmarkInfo" action="InsertResult" target="divLandmarkInfo"/>
<select1 ref="City" onchange="ajaxLandmarkInfo.call('/demos/xmod/ajax_form/' + this.value)">
  <label>View Landmark Info For:</label>
  <items>
    ...
    <item>
      <label>Batavia, IL</label>
      <value>batavia.html</value>
    </item>
    ...
  </items>
</select1>

This is just a small example of what you can do with XMod's AJAX tags. You can use them to not only in data-entry forms, but also display templates, enabling you to provide a more usable experience for your users.

For the more adventurous, you can put your Javascript and DHTML skills to work by instructing the AJAX tag to send the results to a custom function that you define. This allows you complete freedom over how the data gets processed and used in your form or template. The results you receive from the server can be plain text, HTML, Javascript code, or XML.

Purchase XMod or Upgrade Today

  
spacer
Powered By XMod
dummy