 |
 |
 |
 |
 |
 |
XForms tip: Using the switch/case elements
XForms are designed to provide an interactive experience, and in many cases that means showing the user different information based on different conditions. For example, you may have a form with multiple sections, but you don't want to overwhelm the user by displaying it all at once. In this tip, you will use XForms switch and case elements to display only part of a form at any given time.
|
 |
Articles |
 |
22 Sep 2006 |
|
| |
XForms tip: Use XForms to upload a file to Perl
Uploading files is a fairly common task using HTML forms, but how do you do it in XForms, where the data gets stored as part of an XML document? This tip explains how to create an XForms form that enables the user to upload a file, and it explains how to create a Perl script that saves the file on the server once it arrives.
|
 |
Articles |
 |
05 Dec 2006 |
|
| |
XForms tip: Use XForms to upload a file to Java
Uploading files is a fairly common task using HTML forms, but how do you do it in XForms, where the data gets stored as part of an XML document? This tip explains how to create an XForms form that enables the user to upload a file, and it explains how to create a Java servlet that saves the file on the server once it arrives.
|
 |
Articles |
 |
05 Dec 2006 |
|
| |
XForms tip: Using the help and hints events
XForms enables you to easily send help messages and hint messages to a form using elements, but did you know that you can get even more control over this process by reacting to the help and hints events instead? This tip shows you how to detect when the user needs some assistance and react accordingly.
|
 |
Articles |
 |
29 Nov 2006 |
|
| |
XForms tip: Using form submission events
One of the nice things about XForms is how much control it gives you over how the form is processed. For example, XForms exposes a tremendous number of events for which you can trap and perform specific actions. In this tip, you learn how to use the events involved in submitting the form.
|
 |
Articles |
 |
29 Nov 2006 |
|
| |
XForms tip: Using multiple, hierarchical forms with XForms
Standard HTML forms are hard, if not impossible, to nest within each other. They lack the power that XForms has, because XForms uses XML. This tip shows you how to nest multiple, hierarchical forms within an XForm form.
|
 |
Articles |
 |
23 Oct 2006 |
|
| |
XForms tip: Uploading files using XForms
Forms are typically used to request simple, individual pieces of information, such as names and phone numbers, from users. Frequently, however, you need to be able to request that the user send some sort of file along with the submission. This tip shows you how to use the XForms upload element to achieve this.
|
 |
Articles |
 |
23 Oct 2006 |
|
| |
XForms tip: Saving data to local files and reusing later with XForms
Partially completing an online form, only having to leave before you've finished, can be frustrating. XForms can fix this problem. There's a quick and easy way to save the instance data of an XForm so that you can reuse it later.
|
 |
Articles |
 |
17 Oct 2006 |
|
| |
XForms tip: Alerts and message boxes
XForms is about collecting data, but it is also about improving the user experience. In some cases, you need to provide additional information to the user outside of the actual form. In traditional Web pages, you accomplish this through the use of alert boxes and pop-up windows. In addition to its help capabilities, XForms gives you a number of different options for providing additional information for the user. This tip explains alerts and message boxes, the difference between them, and how to use them.
|
 |
Articles |
 |
17 Oct 2006 |
|
| |
XForms tip: Sending XForms data using e-mail
Part of the value of forms is their ability to send information where you need it. In the case of Web forms, that destination is normally a Web server that analyzes the right data. But what if you want to send the information using e-mail? In XForms, you have two options for accomplishing this feat; one on the server side, and one on the client side. This tip shows you how to e-mail XForms data from PHP, and also directly from the browser.
|
 |
Articles |
 |
17 Oct 2006 |
|
| |
XForms tip: Accepting XForms data in Perl
The Perl programming language is widely used on the Internet, and it will continue to be popular for quite some time. It's considered an easy language to program in because it handles strings very well. Also, what you can do in a few lines in Perl takes many more lines of code in other programming languages. In this tip, you'll learn how to submit an XForms form using POST to a Perl script, and capture the data for later use.
|
 |
Articles |
 |
03 Oct 2006 |
|
| |
XForms tip: Combining Ajax and XForms
Asynchronous JavaScript and XML, or Ajax, has been causing a stir in the Web world for some time now, because it enables Web designers to create an application that reacts to the user's actions without having to reload the entire page, a capability that already exists natively in XForms. This tip looks at both the XForms and Ajax versions and how to combine the two techniques. There are plenty of resources out there to teach you how to actually make Ajax requests, but XForms provides some special challenges and opportunities in using the data once you get it back.
|
 |
Articles |
 |
03 Oct 2006 |
|
| |
XForms tip: Accepting XForms data in Java
Much has been made about the ability of XForms to provide interactivity, and to submit information in XML. But none of that will do you any good unless you have a way to analyze the data once you send it to the server. This tip shows you how to access the submitted XML data using a Java servlet.
|
 |
Articles |
 |
03 Oct 2006 |
|
| |
XForms tip: Dealing with dates and time with XForms
Forms often use a date to log the day that a transaction occurred. The time is also useful since it can be used to log when a job was completed, or when something was purchased. This tip shows you how to use the date and time schema types using XForms.
|
 |
Articles |
 |
29 Sep 2006 |
|
| |
XForms tip: Accepting XForms data in PHP
In some ways, an XForms form is just like an HTML form; with the proper encoding, the server-side script receiving the data won't even know the difference. But the strength of XForms forms is in many ways the fact that the data can be submitted directly as XML. Of course, this capability doesn't do you any good unless the script is prepared to receive the data. In this tip, you will see how to create a PHP script that can receive and work with XML data submitted by an XForms form.
|
 |
Articles |
 |
26 Sep 2006 |
|
| |
XForms tip: Using calculations
Part of the allure of XForms is the fact that it provides more of an opportunity to provide interactivity than regular HTML forms, or at least it provides an opportunity to provide that interactivity with much less hassle. One function that's fairly common in Web forms is the ability to perform a calculation based on data supplied by the user. In a traditional HTML form, this means creating a JavaScript script and checking for specific actions such as the user clicking on a button or leaving a particular field. Any of these actions can be prone to error based on different browser versions or rendering of the form in a nontraditional browser. Fortunately, XForms solves this problem by providing a standard way to include calculations in the functionality of your form.
|
 |
Articles |
 |
02 Jan 2007 |
|
| |
XForms tip: Call JavaScript from an XForms form
Because XForms controls are part of a namespace separate from the HTML and
page, you cannot use the usual methods for calling JavaScript in response to user
events, such as the onclick handler. So what are you to do if you need to call
JavaScript from an XForms form? This tip shows you how to do it.
|
 |
Articles |
 |
09 Jan 2007 |
|
| |
XForms tip: Making a read-only control writeable
At times it is crucial to programmatically control the writability of data in your XForms. For example, if you're browsing data in read-only mode (so modifications aren't made by accident), and then you need to update or add new data, the read-only mode of the same controls will need to become writeable. This tip shows how you can change the readonly property of controls programmatically.
|
 |
Articles |
 |
13 Feb 2007 |
|
| |
XForms tip: Reacting to the refreshing of the form
As data changes in your XForms form it can be essential to know right away and do something with the new data, especially when your XForms get more advanced. This tip shows you how to hook such events right into JavaScript methods, thus allowing you to then use the data in many different ways.
|
 |
Articles |
 |
13 Feb 2007 |
|
| |
XForms tip: Using the incremental attribute to detect keystrokes
One of the slickest application genres are those that update data as you type. XForms does this with finesse! Controls have the ability to send events after each keystroke entered within them using the incremental attribute. That way controls that need to change their data based on the data of a control that's changing incrementally can also update their data incrementally, effectively keeping what's viewed "on screen" in sync across the board. This tip shows you how to make the most of the incremental feature with sample XForms code.
|
 |
Articles |
 |
06 Feb 2007 |
|
| |
XForms tip: Using extension functions with Firefox
XForms with Firefox has extension functions that aid your development of JavaScript with XForms. These functions allow you to access your XForms instance data with ease, enabling you to do cool stuff with your XForms, including creating dynamic XForms code. The goal of this tip is to help you make the most of your XForms applications by introducing you to Firefox's extension functions.
|
 |
Articles |
 |
06 Feb 2007 |
|
| |
XForms tip: Using accesskeys for greater accessibility
XForms, the Web 2.0 of forms, could not possibly be Web 2.0 without providing accessibility features. I'm sure you've used the Alt key before, or accidentally typed it while typing up a document. The Alt key focuses in on the File tab at the top of most applications. XForms has similar accessibility capabilities that allow you to focus in on the exact text box you desire, all without having to touch the mouse. This tip shows you how to use this accessibility feature.
|
 |
Articles |
 |
23 Jan 2007 |
|
| |
XForms tip: Enabling cross-domain loading and sending in Firefox
XForms with Firefox has a built-in security feature that inhibits users from "cross-domain" loading and sending of instance data. Just like pop-ups, you don't want this to happen by default unless you trust the Web site. You shouldn't have to worry about it since this security feature is on by default, but sometimes you'll want to be able to perform cross-domain loading and sending of instance data with certain Web sites. This tip will show you how.
|
 |
Articles |
 |
23 Jan 2007 |
|
| |
XForms tip: Dynamically create controls with the repeat, select1, and itemset elements
Forms can have lists of data, which are difficult to display using regular HTML forms. The select1 and itemset elements have a lot of flexibility and are very similar to the select or option tags in HTML. The repeat element really shows its power here in that you can have a list of lists of data, and so on. You'll see how slick it is to populate the data used by the forms using XML. Once you use these XForms controls and populate them using XML, you'll never want to go back to using HTML ever again!
|
 |
Articles |
 |
09 Jan 2007 |
|
| |
XForms tip: Call JavaScript from an XForms form
Because XForms controls are part of a namespace separate from the HTML and page, you cannot use the usual methods for calling JavaScript in response to user events, such as the onclick handler. So what are you to do if you need to call JavaScript from an XForms form? This tip shows you how to do it.
|
 |
Articles |
 |
09 Jan 2007 |
|
| |
XForms tip: Using setvalue
XForms provides a lot of ways to set the information on a control, from instance data to bind elements and calculations. But sometimes you just want to set a value directly; this tip shows you how to use the setvalue element to do just that.
|
 |
Articles |
 |
03 Jan 2007 |
|
| |
XForms tip: Use XForms to upload a file to PHP
Uploading files is a fairly common task using HTML forms, but how do you do it in XForms, where the data gets stored as part of an XML document? This tip explains how to create an XForms form that enables the user to upload a file, and it explains how to create a PHP script that saves the file on the server once it arrives.
|
 |
Articles |
 |
03 Jan 2007 |
|
| |
XForms tip: XForms capabilities accessible through Mozilla and CSS
XForms provides incredible flexibility in the way properties defined within the XForm are displayed and behave. To take advantage of Mozilla's CSS capabilities, pseudo elements must be accessed using Mozilla-specific pseudo classes, because although there is no current support for the pseudo elements, there is support for the pseudo classes. This tip shows gets you started by showing you how to access the Mozilla-specific CSS properties.
|
 |
Articles |
 |
19 Dec 2006 |
|
| |
Tip: Send part of an XForms instance to a Web service
An XForms form is handy as a Web service client because it enables you to easily send and receive an XML document, but what if you don't necessarily want to send the entire data instance? This tip explains how you can build an instance that includes a SOAP message along with other data, and then send only the SOAP message on submission.
|
 |
Articles |
 |
13 Aug 2004 |
|
| |
Make the most of XForms repeats
XForms provides many powerful mechanisms for working with XML data. One such mechanism is the "repeat" element,
which allows you to quickly and easily implement iteration over homogeneous data sets in your XML. In addition, you can format
the presentation of such sets as tables, as well as provide dynamic behavior like the insertion and deletion of specific
pieces of data within the repeating set. Read on for some tips and tricks on how to make the most of your XForms repeats.
|
 |
Articles |
 |
21 Nov 2006 |
|
| |
Dynamic XForms submissions
XForms is an ideal open standards technology for collecting and submitting
data from a wide variety of Web-capable platforms. Creating a single input form for collecting data from many sources is common. However, each location filling out the form may have its own site unique submission requirements such as submitting to multiple targets that are not known to the form author. Mutliple submission targets include local save locations, or submitting to a write-only "vault" for auditing or logging, or any other site-specific submission targets. Using JavaScript to edit the DOM with XForms allows a single form to accommodate multiple, site-unique submission requirements.
|
 |
Articles |
 |
07 Nov 2006 |
|
| |
Tip: Send multiple Web services requests from XForms
A typical HTML form only lets you submit to one URL at a time, which makes it difficult to retrieve information from multiple Web services. This tip shows you how to use XForms to solve that problem by using multiple submissions from a single form.
|
 |
Articles |
 |
03 Sep 2004 |
|
| |
Understanding XForms
With XML-based technologies such as XForms, XQuery, and XSLT, it is possible to create complex multi-user applications, from interactive help systems to custom "game" applications in which multiple users can interact with at once.
|
 |
Articles |
 |
05 Jun 2007 |
|
| |
Tip: Create an XForms form that submits a second instance
Because they can easily send and receive XML, XForms forms make great Web services clients, but using them in this way limits your control over the structure of your instance. This tip explains how to manage your data within one instance while submitting a second.
|
 |
Articles |
 |
22 Jul 2004 |
|
| |
Tip: Use XForms to send and receive Web services messages
One of the great strengths of XForms is the fact that an XForms client can send its data as XML, and that it receives XML in return. This capability can be exceptionally useful in the field of Web services, where that's exactly what gets sent and received: XML messages. In this tip, the author looks at how to use an XForms browser as a Web services client, sending a SOAP request and displaying the results directly in the browser.
|
 |
Articles |
 |
24 Jun 2004 |
|
| |