On Wed, Sep 16, 2009 at 3:24 PM, Markus <[email protected]> wrote:
>
> Hello
>
> Say i have a HTML form that takes in values and stores in JS
> variables.
>
> Is it possible to convert the JS variables to an XML file.
>
> Example:
>
I don't understand why you want to save the JS variables.
In web2py in your controller
form=FORM(TABLE(
TR(TD('Name, _align='right'),
INPUT(_name='name,requires=IS_NOT_EMPTY())),
TR(TD('Salary', _align='right'),
INPUT(_name='Salary', requires=IS_NOT_EMPTY())),
TR(TD('tax on salary', _align='right'),
INPUT(_name='saltax', requires=IS_NOT_EMPTY())),
TR('',TD(INPUT(_type='submit'), _align='center'))
)
)
if form.accepts(request.vars,session):
f = open('file_path', 'w')
print f "<Name>" + form.vars.name + "</Name>
<Salary>" + form.vars.salary + "</Salary>
<tax on salary>" + form.vars.saltax + "</tax on salary>"
-------------------------
Not sure what you want to do exactly though.
-wes
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---