Re: [web2py] Re: Catch rows in Javascript

2012-08-19 Thread Mathias Van Daele
); select.options.length = 0; // clear out existing items for(var i=0; i locations.length; i++) { var d = locations[i]; select.options.add(new Option(d.val,d.id)); } }); Best regards, Mathias 2012/8/19 Alan Etkin spame

[web2py] Catch rows in Javascript

2012-08-17 Thread Mathias
Hi, How can I catch rows in Javascript code ? Thanks Mathias --

[web2py] Ajax cascading selects/drop down lists - passing javascript variabeles

2012-08-15 Thread Mathias
the js variabele in cascade/default/ajax ? Any help would be gratefully appreciated ! Thanks Mathias --

Re: [web2py] Ajax cascading selects/drop down lists - passing javascript variabeles

2012-08-15 Thread Mathias Van Daele
... This seems to be more complex then I was expecting... Can someone give me some advice on this issue ? Thanks Mathias 2012/8/15 Mathias mathias.v.da...@gmail.com: {{extend 'layout.html'}} select id=list1 optionoption 1/option optionoption 2/option /select select id

Re: [web2py] Ajax cascading selects/drop down lists - passing javascript variabeles

2012-08-15 Thread Mathias Van Daele
Thanks for your reply Derek ! This could be interesting for me. I will try to implement it like that. Mathias 2012/8/16 Derek sp1d...@gmail.com: Couldn't you precalculate and put them in your javascript in the page itself? script var nissancars = {{=XML(nissancars)}} var toyotacars

[web2py] Retreive value (option) from a select list

2012-08-08 Thread Mathias
Hello, How can I retreive the selected value (option), from an HTML select ? I want to use this in an ajax function, but I don't know how to get the value. Thanks Mathias --

Re: [web2py] Retreive value (option) from a select list

2012-08-08 Thread Mathias Van Daele
Thanks for your reply Richard ! I was hoping I could find a solution without extra Jquery, but I will try it with Jquery . Mathias 2012/8/8 Richard Vézina ml.richard.vez...@gmail.com: With .val() http://api.jquery.com/val/ With :selected http://api.jquery.com/selected-selector

Re: [web2py] Retreive value (option) from a select list

2012-08-08 Thread Mathias Van Daele
Thanks !! 2012/8/8 Richard Vézina ml.richard.vez...@gmail.com: It's just a matter of selecting the proper html select and get the selected value. Richard On Wed, Aug 8, 2012 at 1:33 PM, Mathias Van Daele mathias.v.da...@gmail.com wrote: Thanks for your reply Richard ! I was hoping I

[web2py] Lifetime of a controller object and db object.

2012-08-02 Thread Mathias
') db.py is read every time again, so I guess db object is instanciated every time db.py is read ? Thanks for the info. Mathias --

Re: [web2py] Lifetime of a controller object and db object.

2012-08-02 Thread Mathias Van Daele
Hello, For each HTTP request, the model (db.py) is read, and the controller executed. So, for each HTTP request, first the model is read (db.py) , and then the controller executed (instanciated ?) ? Thanks Mathias 2012/8/2 Mathias mathias.v.da...@gmail.com: Hello, I am trying to make

Re: [web2py] Lifetime of a controller object and db object.

2012-08-02 Thread Mathias Van Daele
If I call a certain controller function, where does this request come from ? (Main, Model,...) ? Thanks Mathias 2012/8/2 Mathias Van Daele mathias.v.da...@gmail.com: Hello, For each HTTP request, the model (db.py) is read, and the controller executed. So, for each HTTP request, first

Re: [web2py] Lifetime of a controller object and db object.

2012-08-02 Thread Mathias Van Daele
OK, I found the answer to my questions : All is done by Main module : serve_controller(request, response, session) source code this function is used to generate a dynamic page. It first runs all models, then runs the function in the controller, and then tries to render the output using a

[web2py] after login redirect

2012-07-21 Thread Mathias
for a solution whereby anyone, with role 'Straathoekwerkers', will be redirected to this URL. How can I do this ? If I don't pass a user id, it doesn't work. Thanks Mathias --

Re: [web2py] Re: after login redirect

2012-07-21 Thread Mathias Van Daele
auth.has_membership(user_id=auth.user.id,role='Managers'): redirect(URL(r=request,c='management',f='user')) else:redirect(URL(r=request,c='management',f='value')) auth.settings.login_onaccept.append(redirect_after_login) Thanks Mathias 2012/7/21 Anthony abasta...@gmail.com: One

[web2py] Adding cancel button - form submission

2012-07-17 Thread Mathias
) If I click the cancel button now, nothing happens anymore. Any help is welcome. Thanks Mathias --

Re: [web2py] Adding cancel button - form submission

2012-07-17 Thread Mathias Van Daele
Thanks for your solution Richard ! I am still looking for a solution with a button component... Mathias 2012/7/17 Richard Vézina ml.richard.vez...@gmail.com: Maybe this could be enough?? {{=A(T('cancel'),_href=javascript:void(history.go(-1)))}} It will bring you back to the precedent page

Re: [web2py] Adding cancel button - form submission

2012-07-17 Thread Mathias Van Daele
I found a good solution for me : form[0][-1][1].append(TAG.INPUT(_value='Cancel',_type=button,_onclick=window.location='%s';%URL(r=request,f='new_contact'))) Mathias 2012/7/17 Mathias Van Daele mathias.v.da...@gmail.com: Thanks for your solution Richard ! I am still looking for a solution

[web2py] query referenced table in grid/smartgrid

2012-05-06 Thread Mathias
Is there an easy way to query a referenced table in a grid/smartgrid ? Is the only way, to achieve this goal, writing a search_widget ? Does anyone already has written some code to achieve this goal ? Thanks Mathias

Re: [web2py] Represent - redirect

2012-01-17 Thread Mathias Van Daele
Thanks !! Op 17 januari 2012 00:44 schreef Anthony abasta...@gmail.com het volgende: On Monday, January 16, 2012 4:47:01 PM UTC-5, Mathias Van Daele wrote: Thanks for answer Johann. But how can I catch the value of args in the concerned function ? args from the URL are always

Re: [web2py] Represent - redirect

2012-01-16 Thread Mathias Van Daele
Thanks for answer Johann. But how can I catch the value of args in the concerned function ? Thanks Op 16 januari 2012 13:15 schreef Johann Spies johann.sp...@gmail.com het volgende: On 15 January 2012 22:49, Mathias Van Daele mathias.v.da...@gmail.comwrote: Hello, I have a select crud

[web2py] Represent - redirect

2012-01-15 Thread Mathias Van Daele
: table=db.contact_part db.contact_part.id.represent = lambda id, row: A('edit',_href=URL()) query = (db.contact_part.contact==session.contactID) form3 = crud.select(table,query,fields=['contact_part.subject','contact_part.tags','contact_part.id']) Thanks Mathias

[web2py] Internationalization for DB table field names and DB table content

2011-12-26 Thread Mathias Van Daele
translated too. Thanks in advance Mathias

Re: [web2py] Re: Internationalization for DB table field names and DB table content

2011-12-26 Thread Mathias Van Daele
Hey Anthony, thanks for your answer ! Your solution for question 1 working fine ! (with label) For questions 2 I am still trying... Mathias Op 26 december 2011 19:06 schreef Anthony abasta...@gmail.com het volgende: Concerning question 1 : How can I translate name_father,name_mother

Re: [web2py] Re: Internationalization for DB table field names and DB table content

2011-12-26 Thread Mathias Van Daele
files to translate. Since u apply it just to a few fields/rows/tables, it can work fine. But for large contents, you will need a tool/api to automate translation, and use a function to call it. Alexandre Andrade 2011/12/26 Mathias Van Daele mathias.v.da...@gmail.com Hey Anthony, thanks