Skip to content
Hub Nexus

No author yetClaim it

Version 1Updated 1 min read

Support

Sample Program

Add this code to global.js

type="text/javascript">
// adding a gmail style function to stop the user from moving away from the page..
function unloadMessage(){message = "This form has not yet been submitted to the database\nAll data will be lost."
return message;}
function setBunload(on){window.onbeforeunload = (on) ? unloadMessage : null;}
setBunload(true);

Mozilla Page [1]

IE Manual [2]

Discussion

Use the xf:load action in combination with an xforms-value-changed event to call a "dirty" function containing setBunload(true).

Likewise, use the load action within the submission to call a "clean" function containing "setBunload(false)".

function dirty() {
setBunload(true);
}
function clean() {
setBunload(false);
}
This one goes in your "submission" element:
resource="javascript:clean()" ev:event="xforms-submit-done"/>

and this
resource="javascript:dirty()" ev:event="xforms-value-changed"/>
goes somewhere in the form - place it at the body-level to capture all change events, or nest it within a more appropriate container.

References

This example was taken from Alex Bleasdale in 2007.

Microsoft documentation on page unload function

Where this page came from

This page was imported from Wikibooks. From “XForms” on Wikibooks, by its contributors, under CC BY-SA 4.0. Changed here: set as a page; navigation and edit links left out; each image under its own licence, credited in its caption.

Nobody has written it yet — it is the source material at a new address, which is why search engines are asked to skip it and why no one earns from it. It is up for grabs: take it on, and it is yours to rewrite and to earn from.

Get each new page of

XForms

Following means one email when a page is added, nothing when a page changes.

Following means one email when a page is added, nothing when a page changes.

Comments

Spinner Logo

Next in XForms

CC BY-SA 4.0
I have tried to use the current() function inside the repeat like this: ref="current()/@selected" value="'false'" /> but with no luck. If anyone knows how to get this working, please let us know. Thanks - Dan ### Alternate Way Note: does not work inside . Here is the workaround for this.
CC BY-SA 4.0
id="default-instance"> xmlns=""> B-item 2001-05-03 A-item 2005-05-03 Z-item 2003-05-03 D-item 2002-05-03 id="stylesheet"> xmlns="" xmlns:xsl=" version="1.0"> match="/"> select="data/item"> type="string" select="name"/> match="*|@*|text()"> select="*|text()|@*"/> To perform the sort we will use the f
CC BY-SA 4.0
Xfolite is licensed under the LGPL license. ### PicoForms [PicoForms]( has an XForms implementation that runs on cell phones supporting MIDP 2.0 and CLDC 1.x. It also supports PDAs including Palm and Pocket PCs. PicoForms is also able to provide customers (and evaluators) with an online development
CC BY-SA 4.0
To do this do the following. From the Windows start menu click Start/Run. Enter "regedit" and press enter. Use the Registry browser to navigate to the HKEY_CLASSES_ROOT folder and then find the MIME/Daatabase/Content Type folder.
CC BY-SA 4.0
The [Apache web server]( is the most popular web server on the Internet. It provides high-performance web pages serving and is very secure. By default, the out-of-the box Apache server does not allow users to write files to a web server. This is done for security reasons.
CC BY-SA 4.0
Many of these problems could be avoided by automatically reverting to the prior version of a configuration file. ## Background With the XForms standard we are given the element and a small list of HTTP operators (GET, PUT, POST) to use and an action that can be any URL. If we want to allow users to