xajax对象为可能从php脚本或输入表单事件处理程序中调用的php函数创建包装器函数。
The xajax object creates wrapper functions for the PHP functions that may be invoked from a PHP script or an input form event handler.
在JSF应用中,如果你通过提交一个表单或者点击一个连接(都需要是通过JS F组件提供的),JSF实现将分别生成一个表单事件和命令事件。
In a JSF application, if you submit a form or click on a link (both of which must be represented by JSF components), the JSF implementation creates a form event or a command event, respectively.
大多数与日程表应用程序相关的工作都处在约会表单中,包括重复事件的管理。
Most of the work associated with calendar applications resides in the appointment form, including management of recurrent events.
用户在表单中输入详细的事件信息并提交后,脚本第二部分派上用场了。
Once the user enters event details into this form and submits it, the second half of the script swings into action.
此事件对象稍后用来预防默认表单提交。正如之前代码所述。
This event object is later used to prevent default form submission, as in the earlier code listings.
而且,事件处理脚本和表单的表示标记混杂在一起。
And, finally, the event handling scripts are intertwined with the form's presentation markup.
这是一个即时事件处理的例子,因为整个表单没有在调用事件处理程序之前进行有效性验证。
This is an example of immediate event handling, since the whole form is not validated before the event handler is invoked.
这时,您可能要问,如果表单要依靠这些事件,该怎么办?
So you may well be wondering at this point, what if the form is dependent on these events?
使用这种技术,您可以在允许提交表单之前执行定制验证逻辑,或者在表单提交之后触发一个定制事件。
Using this technique, you could execute custom validation logic before allowing the form to be submitted, or you could trigger a custom event after the form is submitted.
确定表单输入字段之后,创建同名的事件,如清单11所示。
After you have identified a form input field, create an event for it with the same name, as shown in Listing 11.
如事件处理和生成一节中所述,HTML表单小部件为每个输入字段动态创建接收事件。
As explained in the event handling and generation section, the HTML form widget dynamically creates receive events for each of the input form fields.
清单5产生了一个简单的事件搜索表单,具有针对事件关键字、位置和类型的字段。
Listing 5 generates a simple event search form, with fields for event keywords, location, and type.
为了对每个表单输入字段动态创建事件,首先需要对所有表单输入字段的HTML解析,如清单10所示。
To create the events dynamically for each of the form input fields, you first need to parse the supplied HTML for all form input fields, as shown in Listing 10.
您可以使用onloaded事件处理程序根据服务器响应处理其他表单字段。
You can use the onloaded event handler to process other form fields based on the server response.
最后,在表单的Postmodechange事件中(参见图3),包含以下代码,以便在用户从读模式转换到编辑模式时强制执行刷新。
And, finally, in the Postmodechange event of your form (see figure 3), include the following code to force a refresh when the user switches from read mode to edit mode.
现在,只需要将其通过Ajax提交,方法还是通过向表单的submit事件添加一个处理程序。
Now you just need to make it submit via Ajax, too, by attaching a handler to the form's submit event.
验证的DOM支持,为表单元素增加了validity属性和新的invalid事件。
DOM support for validity, with a validity attribute for form elements, and a new invalid event.
HTML表单(如图5 所示)只允许将三种类型的事件消息发送到分派servlet。
The HTML form (shown in Figure 5) simply allows three types of event messages to be sent to the dispatching servlet.
还增加了一个新的动作元素并由 xforms-ready事件触发,即当表单加载的时候触发。
You also added a new action element that is triggered on the xforms-ready event, which triggers when the form loads.
对于复杂的表单,应考虑使用exit事件,而不是使用auto- refresh。
For more complex forms, consider using exit events instead of auto-refresh.
只需要个别简单的注解,Seam中的EJB3业务组件就能直接被用来支持JSFWeb表单或者处理WebUI事件。
With a few simple annotations, the EJB3 business components in Seam can now be used directly to back JSF web forms or handle web UI events.
最后一步是用代码创建一个新web页面,来创建表单并处理Validate按钮上的提交事件。
The final step is to create a new web page with the code to create the form and handle the submit event on the Validate button.
RegionDoubleClick事件允许用户双击一个日程表日期,自动打开新的约会表单。
The RegionDoubleClick event allows users to double-click a calendar date and automatically launch the new appointment form.
只能使用jQueryForms呈现该表单提交的结果,jQuery Forms 是一个库,它将一些方便的方法和事件挂钩(hook)封装到ajaxForm对象中。
You can't render the results of this form submission using ThickBox without leveraging jQuery Forms, a library that wraps several convenience methods and event hooks into an object called ajaxForm.
然后,它在按钮上注册一个单击事件,所以当按钮被单击时,第一个表单会通过Ajax 方式提交。
Then, a click-listener is installed on the button, so that when the button is clicked, the first form is submitted via Ajax.
如果遇到无法识别的扩展函数,表单将停止处理并发起一个x forms - compute -exception事件。
If it sees an extension function it doesn't recognize, it halts processing by signaling an xforms-compute-exception event.
您可以使用oncleared事件处理程序清除任何其他表单字段或重置表单。
You can use the oncleared event handler to clear any other form fields or reset the form.
在WebCal应用样例中,视图或者显示一个用户引发的各种事件,或者显示新事件的输入表单。
In the example application WebCal, views show the events of a user, or they display input forms for new events.
这个处理程序阻止默认事件(提交表单)触发,将额外的ajax参数的值设置为1,使用原始表单发出一个ajax请求以获取URL和数据。
This handler prevents the default event (submitting the form) from being fired, sets the value of the extra ajax argument to 1, and makes an ajax Request using the original form for the URL and data.
清单10以清单7为基础,创建一个表单来添加新的事件清单,然后将要添加的表单数据提交到Googlebase。
Listing 10, which is based on listing 7, creates a form to add new event listings and then submits the form data for addition to Google base.
应用推荐