ReJump


Chapter 5:: Manual:: ReJump DataFile
Technology



 


Home

Datafile
About
News
Manual
<...
Chapter 5
...>
Download
Contacts








Information input

For information input in html we use forms.
Here the example in html-document:

<form method=post action='/'>
Text:
<textarea name=text cols=50 rows=10></textarea>
<input type=submit value=' Add message '>
</form>

<textarea> serves for text input, and <input type=submit> - input confirmation button.

Adapt that form to "rejump" system.
Add following parameters:
<input type=hidden name=a value="input">
<input type=hidden name=err_tpl value="guestbook-add_mes">
<input type=hidden name=ok_tpl value="guestbook-ok">
<input type=hidden name=act_tpl value="guestbook-actions-add_mes">
<input type=hidden name=res_link value="/guestbook">

Whole text of form looks as follows:
<form method=post action='/'>
<input type=hidden name=a value="input">
<input type=hidden name=err_tpl value="guestbook-add_mes">
<input type=hidden name=ok_tpl value="guestbook-ok">
<input type=hidden name=act_tpl value="guestbook-actions-add_mes">
<input type=hidden name=res_link value="/guestbook">
Text:
<textarea name=Message cols=50 rows=10></textarea>
<input type=submit value=' Add message '>
</form>

Parameters:
action='/' - that parameter's value ia standard, it's an ordinary reference to our system.
<input type=hidden name=a value="input"> - means that this is the input form.
<input type=hidden name=err_tpl value="guestbook-add_mes"> - sets template's name, which will be output in error.
Optimal if that template coincide with input form template.
Later we'll say how to transmit already input parameters to that template.
<input type=hidden name=ok_tpl value="guestbook-ok"> - template's name will be output in case if input operation is success.
<input type=hidden name=act_tpl value="guestbook-actions-add_mes"> - script of data input. See below how to describe script of input.
<input type=hidden name=res_link value="/guestbook"> - link of changeover. If template "ok_tpl" would be used for different actions it is possible to indicate diferent adresses for changeover. Example: "/guestbook" if it is ususal user and "/guestbook-admin" for administrator.

Files from the folder "templates" could be templates for html-documents and scripts executable by ReJump system. It is impossible to use html-tag in script. You can use only conditional transfer operators and ReJump functions.

Example of data input script (template "act_tpl"):
add_name=add(data-guestbook,mes);
update(add_name,Text,$i.Message);

add() - adds empty object with extension "mes" in folder "data-guestbook"
update() - enter and renew information in "$i.Message" - text which was input in the field "Message"
("$i" - indicates an input form; "$i.Message" - parameter of form with name "Message")
Parameter "Text" in "update" function points to file contents. In that case contents of new file which name is in the variable "add_name".

There are some functions in the system:
del(object) - delete object
addLink(object, extension, object) - link creation
(for additional information about links see section 6)
delLink(object, extension, object) - delete link

There are all features as in templates (using expressions, insertions) in ReJump system scripts.

Script would execute only when it is completely collected (all expressions are calculated, all elements of insertion are put in).

Index
Download
Contacts
If you have any questions, please, contact us via email: datafile@rejump.com.


© 2002-2009 Алексей Мась, ReJump