[web2py:19742] Using Ajax with forms

2009-04-14 Thread Nazgi

Hi,

 I'm a newbie for this framework, so i'm facing problems using
Ajax. I actually want to create a form with a select option for the
user. Based on the selection he makes, another select menu should be
displayed with a few more options. And based on this selection, yet
another selection menu should be displayed. Please help me with the
task.

Thanks,
Nazgi.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:20158] web2py + pyjamas

2009-04-21 Thread Nazgi

Hi,

 I'm new to both web2py and pyjamas. I'm trying to write a simple
interactive form which can autopopulate select boxes based on the user
selections.

 I tried using the application in 
http://mdp.cti.depaul.edu/AlterEgo/default/show/203
 I've corrected the syntax errors and few other errors suggested
in the mailing list 
http://groups.google.com/group/web2py/browse_thread/thread/9bb107c2fbd1a34b?hl=en#

But still when I'm trying to build TodoApp.py using pyjamas, I'm
getting errors. Please help me out Below is the output of the
compilation...

~/pyjamas-0.5p1/bin/pyjsbuild -d TodoApp.py
Building 'TodoApp' to output directory '/home/nithin/web2py/
applications/todo/static/output' with debugging statements
Copying: pygwt.js
Copying: Images and History
Including LIB sys
Importing sys
Including LIB pyjslib
Importing pyjslib
Including JS _pyjs.js
Including JS dynamicajax.js
Including JS sprintf.js

Importing TodoApp
Importing pyjamas
Importing pyjamas.JSONService
Importing pyjamas.JSONParser
Importing math
Importing pygwt
Importing pyjamas.HTTPRequest (Platform IE6)
Traceback (most recent call last):
  File "/home/nithin/pyjamas-0.5p1/bin/pyjsbuild", line 21, in

pyjs.build.main()
  File "/home/nithin/pyjamas-0.5p1/pyjs/build.py", line 720, in main
options.cache_buster, options.optimize)
  File "/home/nithin/pyjamas-0.5p1/pyjs/build.py", line 246, in build
output, dynamic, cache_buster, optimize)
  File "/home/nithin/pyjamas-0.5p1/pyjs/build.py", line 376, in
generateAppFiles
debug=debug)
  File "/home/nithin/pyjamas-0.5p1/pyjs/pyjs.py", line 1743, in
translate
module_name, is_app, debug=debug, imported_js=imported_js)
  File "/home/nithin/pyjamas-0.5p1/pyjs/pyjs.py", line 1685, in
_translate
file_name = self.findFile(module_name + self.extension)
  File "/home/nithin/pyjamas-0.5p1/pyjs/pyjs.py", line 1678, in
findFile
raise Exception("file not found: " + file_name)
Exception: file not found: ui.py

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:20332] ajaxulated forms in web2py

2009-04-22 Thread Nazgi

Hi,

   I'm a newbie to web2pyI'm doing a project using web2py
framework.
   I have written a form for my project in a controller
of the web2py(say identitiy.py) and am accessing it from some views.
Now I want to add ajax functionalities to my form. I am providing the
user with two select boxes and based on his selection in first box, I
should retrieve a selected terms from a database and populate them in
the next select box.

 I've written a code bt it isn't working. It would be really
helpful if someone provides me
with my required functionality or guides me how to debug ajax codes in
web2py.I would
have sorted it myself but this is a very immediate task that needs to
be done for me.
So I request you guys to help me through this. Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:20410] debuggers for ajax in web2py

2009-04-23 Thread Nazgi

Hi,

I'm new to web2py. Can some1 tell me how to debug javascript
code in web2py? I've written the following code and am not able to
debug it...can some1 help me out plz...

in controllers/identity.py

def getcities():
citystr = request.vars.values()[0]
output = "Nizamabad"
if int(citystr) == 1:
output = "Hyderabad"
elif int(citystr) == 2:
output = "Chennai"
elif int(citystr) == 3:
output = "Pune"
return output

def index():
form=FORM(TABLE(
TR("State:",\
SELECT("Andhra Pradesh","Delhi","Tamil
Nadu",_name="state", _id="States",default="Andhra
Pradesh",_onchange="ajax('{{=URL(r=request,f='getcities')}}',
['States'],'handle')",requires=[IS_NOT_EMPTY()])),\
TR(DIV(_id="handle"
return dict(form=form)

in identity/index.html

{{extend 'layout.html'}}


{{=response.flash}}
 Register

 {{=form}}



I'm not able to pick where the connection is lost. Is my ajax function
working and communicating with getcities method or is it the wrong way
to write the handle function?

Its really a urgent thing for me. Please help me out. Thanks in
advance...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:20486] forms in web2py

2009-04-25 Thread Nazgi

Hi,

   I hav written a form in controller of my application. The form
has a select option which based on its input uses ajax and calls a
function. This function sends a json list object. How do I access that
variable in order to incorporate the contents of that list as another
select option menu.?

Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:21037] redirection to next page on submit

2009-05-03 Thread Nazgi

Hi,

  I'm new to python and web2py. I have a simple doubt. I've
written a form and after the submit button is pressed in the form,  I
want to print the variables of the form into next page and ask for
confirmation. I have written the form in a controller and also the
function for the next page where the variables of the form are
printed. But i dont know how to direct to that page after pressing of
the submit button. Can someone help me regarding this.

regards,
Nazgi
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---