Table of Contents

Fupdate.Prompt

docs

These classes pick up where Fupdate and Fupdate.append leave off and do pretty much the same thing. The difference here is that the form is displayed to the user in a prompt.

In this first example, the form is the same as the example for Fupdate, only I've hidden it (display:none) and then passed it to Fupdate.Prompt so that it'll be used in the popup.

new Fupdate.Prompt($('fupdateForm'), $('fupdateReply'), {
	stickyWinOptions: {
		/* this just updates the location
		   of the text over the input */
		onDisplay: OverText.update
	}
}).prompt();
execute this code

Fupdate.Append.Prompt

This does the same thing as Fupdate.Append, except, as with Fupdate.Prompt the form is displayed in a popup.

new Fupdate.Append.Prompt($('fupdateAppendForm'), $('fupdateAppendReply'), {
	stickyWinOptions: {
		/* this just updates the location
		   of the text over the input */
		onDisplay: OverText.update
	},
	inject:'top'
}).prompt();
execute this code

Fupdate.AjaxPrompt

Finally, we have two classes that do the same as the classes above, except they fetch their form data from the server instead of the DOM.

new Fupdate.AjaxPrompt('/wiki/simpleForm.html', $('fupdateAjaxPromptReply')).prompt();
execute this code

Fupdate.Append.AjaxPrompt

Yep. You guessed it. The final class appends data to the target and fetches its form via Ajax.

new Fupdate.Append.AjaxPrompt('/wiki/simpleForm.html', $('fupdateAppendAjaxPromptReply'), {
	inject: 'top'
}).prompt();
execute this code