Re: [web2py] Re: web2py ajax function in py4web

2020-11-09 Thread Tom Campbell
Also, Stifan, could you post a few use cases? py4web includes vue.js by default and I am trying to understand the most common use cases of this for documentation purposes. I am guessing: - Instant form update on client side when a value is changed (for example, a star rating or even a compli

[web2py] Re: web2py ajax function in py4web

2020-11-09 Thread Jim S
Stifan Can you post this in the py4web group? In py4web we don't include any jquery components. The goal is to be as light as possible and require as few additional packages as possible. I think you'll get better visibility on the py4web list to get this question answered. I know there are

[web2py] web2py ajax function in py4web

2020-11-07 Thread 黄祥
http://web2py.com/books/default/chapter/29/11/jquery-and-ajax#The-ajax-function how to achieve this in py4web ? thx n best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py

Re: [web2py] Re: How to send contenteditable to web2py AJAX call

2020-08-03 Thread AGRogers
Thanks for update. On Sun, 2 Aug 2020, 6:38 am Rob Paire, wrote: > So I stepped through the Web2py AJAX call in the debugger and found that > the hang-up was due to jquery serialize method. That method wants a form > variable name as input. The easiest solution is to wrap the table

[web2py] Re: How to send contenteditable to web2py AJAX call

2020-08-01 Thread Rob Paire
So I stepped through the Web2py AJAX call in the debugger and found that the hang-up was due to jquery serialize method. That method wants a form variable name as input. The easiest solution is to wrap the table in a set of form tags and then modify the TD so that it contains a form input

Re: [web2py] Re: How to send contenteditable to web2py AJAX call

2020-08-01 Thread Rob Paire
example, I can't find a the target which is >>> addressed by your call (first example from documentation it's >> id="target">) >>> >>> And why do you want a ajax action for the , because it's static. >>> What do you want to archiv

Re: [web2py] Re: How to send contenteditable to web2py AJAX call

2020-08-01 Thread AGRogers
et">) >> >> And why do you want a ajax action for the , because it's static. What >> do you want to archive by this? Maybe there is an easier way for that. >> >> Best regards >> Clemens >> >> >> On Saturday, August 1, 2020 at 12:34:45 AM UT

Re: [web2py] Re: How to send contenteditable to web2py AJAX call

2020-08-01 Thread Rob Paire
>> >> Hi All, >> I am trying to send data entered into the contenteditable feature of a >> row object using a Web2py AJAX call, and it's not working. >> >> The problem is illustrated below in a sample View file with two Ajax >> calls. The first c

[web2py] Re: How to send contenteditable to web2py AJAX call

2020-08-01 Thread Clemens
u want to archive by this? Maybe there is an easier way for that. Best regards Clemens On Saturday, August 1, 2020 at 12:34:45 AM UTC+2, Rob Paire wrote: > > Hi All, > I am trying to send data entered into the contenteditable feature of a row > object using a Web2py AJAX call, and it

[web2py] How to send contenteditable to web2py AJAX call

2020-07-31 Thread Rob Paire
Hi All, I am trying to send data entered into the contenteditable feature of a row object using a Web2py AJAX call, and it's not working. The problem is illustrated below in a sample View file with two Ajax calls. The first call, from the manual, uses an input form variable and it works

[web2py] ajax - sqlform

2019-10-20 Thread Dirk C
Hey, I'm new to web2py. I want to update a inputfield with the return value of a function. when adding a new record to t_cre_customers, i want to lookup in table t_cre_contractors. I'm using focusout event to launch. Passing the argument of field t_cre_customers_f_ctm_no to function cre_find_con

[web2py] Ajax Pass ID to Controller Function

2019-09-21 Thread Cristina Sig
Hello everybody, I'm struggling with this right here. I want to pass an id from view to a controller function so I can delete a record from database. So far this is what I got. I would appreciate some light on this because I don't know what I'm doing wrong. Thanks! view $('#warning').on('click

[web2py] ajax controller loses formatting?

2019-01-02 Thread Vlad
I am sure I am missing something very basic here, but... googling didn't help... When I have a contoller which I use in ajax calls, it all works just perfect except that the view loses the formatting (for example, it does keep the links and bullets - yet loses bootstrap formatting of everything

[web2py] Ajax Live Search (auto-complete)

2018-09-12 Thread mostwanted
I have been looking at the code for the Ajax Live Search auto-complete under Ajaxing your search functions of the web2py cookbook, i want to implement the No results function if the search does not return anything but i'm not sure where and how to implement it. The Ajax live search code is her

[web2py] Ajax encoding problem

2018-02-07 Thread icodk
probably not a web2py issue but may be someone can help: I have a string field containing the string 'TØM', all works fine in pure web2py. When I try to read it dynamically with ajax I get the string 'T\xc3\x98ST' The ajax call is as following: $.ajax({ type: "POST", url: "/shop/a

[web2py] ajax call from Select sends ["345","346"] instead of ["346"]

2017-09-26 Thread António Ramos
Hello i found a strange thing. The first select calls the endpoint correctly with "2800" or "EMP1" in postvars None Zé Jaquelino however this select calls the same endpoint with ["345","346"] 10 0 C

[web2py] Ajax upload, working in localhost (rocket), but not working in prodution (nginx)

2017-07-15 Thread Junior Phanter
Sorry my bad english. I'm doing some kind of image server. Running on localhost with the rocket works without problems, but when I pass the same code to the production gives the AJAX returns me "NOT FOUND", in production is used nginx as server, does the problem is in it? Here's my code: *in model

[web2py] Re: web2py ajax function - checkbox form element value

2017-03-14 Thread 黄祥
the value of checkbox is either on or None *e.g.* *controllers/default.py* def callback(session_order_product): counter = int(request.vars.counter) if request.vars.action == 'adjust_factory': id = int(request.vars.id) factory = request.vars.factory if factory == 'on': factory = 'None' session_order

[web2py] web2py ajax function - checkbox form element value

2017-03-14 Thread wdtnh
I'm using the web2py ajax function and it works fine except that the 2nd argument of the ajax function which is a list of names for the form elements includes one that is a checkbox. The ajax submission passes along the value of "on" I know that the I don't if the ajax

[web2py] ajax and 403 forbidden issue..

2017-01-11 Thread António Ramos
Hello i use the web2py ajax function to call an action that needs auth.requires_signature() INPUT(_onclick="ajax('"+url+"',[],':eval')" the users see a popup that i inject in the response because of the eval However if i have admin open and do a query, wh

[web2py] ajax return multiple javascript one at a time

2016-06-05 Thread Paolo Amboni
I don't know if it is possible but: I need to query 4 different db with a single form input. Since each query may need some time to perform i want to show the the result of the first query as soon as it is available, and then move to the second query and so on. I tried calling multiple ajax fun

[web2py] Ajax Form Update (and thank you for all the help)

2016-04-25 Thread Mark Billion
I have a form that is accessed through ajax and displayed in a modalRight now, on success, the modal clears and the parent page is reloaded, which then shows the data that was entered in the table. i.e., ajax_form = SQLFORM(...).process(next = URL('default', page_name)) {{for x in y:}} x

[web2py] ajax callback onchange for checkbox boolean

2016-02-01 Thread 黄祥
just wondering about ajax callback onchange for checkbox boolean e.g. *modules* if current.request.vars.action == 'adjust_factory': * #factory = current.request.vars['factory_%s' % id]* *factory = current.request.vars.factory* if factory == 'on': factory = 'None' session_order_product[id] = factor

[web2py] Re: Why does this Web2Py ajax call fail to return the value of a variable?

2016-01-21 Thread Anthony
ou for your help. I read chapter 11 of the Web2Py book and I'm > still confused. > > > I really want to be able to pass candidate.id (depending on which row's > button was pressed) and the button direction to controller variables. > Please let me know if there's

[web2py] Why does this Web2Py ajax call fail to return the value of a variable?

2016-01-21 Thread Ben Wolski
ackoverflow.com/questions/34894755/why-does-this-web2py-ajax-call-fail-to-return-the-value-of-a-variable> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Iss

[web2py] ajax need to return 4 values

2015-11-14 Thread lucas
hello one and all, how do i run an ajax function under an onchange of a select where the return 4 values will be going to 4 separate other inputs of type text, select, or textarea? thank you in advance, lucas -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://

[web2py] ajax todo lists

2015-09-29 Thread Mark Billion
Does anyone have a good example out there in W2Pland? Im looking -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because yo

[web2py] Ajax callback with current select value

2015-08-11 Thread Gael Princivalle
Hello. I'm still making a form like in this post: https://groups.google.com/forum/#!searchin/web2py/jquery$20db/web2py/tvfncYsLrQs/MRHG5MWOMlAJ How is it possible to pass like a var the current select option value to the ajax call? With something like that? data: {value: $('#sel

[web2py] ajax error

2015-07-27 Thread ermolaev . icreator
in main view: {{=A(TAG.i(_class='fa fa-search', _style='width:100px;'), _id = 'go', _onclick='ajax("'+URL('where', 'list')+'", ["addr"], "tag");$(this).addClass("disabled").children("i").removeClass("fa-search").addClass("fa-refresh fa-spin");',

[web2py] AJAX on click not restore button

2015-07-19 Thread ermolaev . icreator
2.11.2.11.2-stable+timestamp.2015.05.30.16.33.24 (Running on Rocket 1.2.6, Python 2.7.9) please test: # -*- coding: utf-8 -*- from time import sleep def aj1(): session.t = (session.t or 0) + 1 sleep(2) return 'OK %s. Click once more!' % session.t def index(): h = CAT( F

[web2py] Ajax and table with queried values

2015-06-24 Thread Carla Raquel
I'm having a bit of trouble figuring out how to add info to a bootstrap table in a panel, through ajax.This's a phone call register system and I have the following code in the html: resumoMensal.html   Extensions

[web2py] Re: web2py ajax javascript function question regarding return from post request

2015-06-05 Thread wdtnh
e and run. > > Anthony > > On Friday, June 5, 2015 at 9:08:27 AM UTC-4, wdtnh wrote: >> >> Appreciate any help one can offer. I have an web2py application where I >> need to perform using the custom web2py ajax function provided with web2py: >> >> ajax

[web2py] Re: web2py ajax javascript function question regarding return from post request

2015-06-05 Thread Anthony
I > need to perform using the custom web2py ajax function provided with web2py: > > ajax(url, [name1, name2, ...], targetFunction). > > The post works fine on the server side but I was wondering if there is a > way to use this function to catch the new ID (pkey) field value

[web2py] web2py ajax javascript function question regarding return from post request

2015-06-05 Thread wdtnh
Appreciate any help one can offer. I have an web2py application where I need to perform using the custom web2py ajax function provided with web2py: ajax(url, [name1, name2, ...], targetFunction). The post works fine on the server side but I was wondering if there is a way to use this

Re: [web2py] ajax callback update css value

2015-05-20 Thread Massimiliano
maybe return SCRIPT("jQuery('#status').html('%s'); jQuery('#status').css('class', value);" % (status)) On Thu, May 21, 2015 at 7:41 AM, 黄祥 wrote: > hi, > > is it possible to have ajax callback return that update css value? > e.g. > *controller* > def callback_2(session_order): > """ cutted ""

[web2py] ajax callback update css value

2015-05-20 Thread 黄祥
hi, is it possible to have ajax callback return that update css value? e.g. *controller* def callback_2(session_order): """ cutted """ if int(total_debit) == int(total_credit): status = 'Balance' value = 'text-success' else: status = 'Unbalance' value = 'text-danger' #return "jQuery('#status').htm

[web2py] ajax callback can not return string type data

2015-05-15 Thread 黄祥
hi, is it possible to have ajax callback return string type data? e.g. controllers def callback_2(session_order, target_response): ... cutted if int(total_debit) == int(total_credit): #status = "Balance" #status = str("Balance") status = 1 else:

[web2py] AJAX div reload indicator

2015-04-21 Thread Gary Cowell
Hello I have a DIV component I'm reloading using another controller , so I end up calling: response.js = "jQuery('#stackList').get(0).reload()" Problem is, my stackList controller function does a lot of work to rebuild the grid, it makes many AWS api calls, to populate the grid. The re

[web2py] Ajax User Registration

2015-03-10 Thread naveed
I have ajax login working using auth.login_bare, but I can't figure out how to do the same for register. I do see register_bare, but it's probably not what I need. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https:

[web2py] Ajax call issues.

2015-03-01 Thread John Costantino
Hey so I have a mail script written in python which works fine when I run it from a linux terminal. My issue is I need to make an ajax call passing in parameters from a custom form I created. In the Javascript it calls the script but the mail never sends. I am stumped I have been trying to get t

[web2py] Ajax call does not redirect.

2015-01-18 Thread James O' Driscoll
I am creating a canvas on a webpage to display some graphics. In order to create the graphics I need to grab the screen size of the device. To do this I am using a ajax call in the header of the view of the display_canvas function to pass the screen width to a helper function which redirect

[web2py] Ajax/Updated Form Field

2014-12-30 Thread Mark Billion
I may be an idiot but I want to set up a form so that you click to edit, and on focus out, the data is committed to the DB via Ajax. 1. Im using the inplace_edit(f,v) module from slices: wrapper = DIV() inp = SQLFORM.widgets.string.widget(f,v) lbl = SPAN(inp['_value'],_id='in

[web2py] ajax eval not working when url has an argument

2014-10-31 Thread Toby
Hi, I tried this ajax eval example: http://www.web2py.com/books/default/chapter/29/11/jquery-and-ajax#Eval-target It works fine so long as the url doesn't have an argument. But if I add an argument to the url, then it doesn't work anymore. For example https://apps.homemade-gifts-made-easy.com/aj

[web2py] ajax issue/question

2014-10-27 Thread Craig Matthews
I am encountering what I think is a weird problem with an ajax call. My web page contains an iframe, which is loaded with a normal controller/view web2py request. When a button is clicked that should cause the javascript in the iframe to send an ajax request to web2py, I am seeing only a reques

[web2py] ajax question

2014-10-09 Thread HR Gartenbauer
I need to update multiple targets when a link is clicked. This example builds a list of links. When the link is clicked, the callback needs to populate two different parts of the .html file. The actual application uses bokeh for plotting. The table of links is created dynamically. The user will

[web2py] Re: Web2py ajax call and Angularjs

2014-09-21 Thread dlypka
operly into main pages. > Anyone is trying the same thing or got some hints for me?. > I cannot find any examples of how use web2py ajax (or jquer ajax) with > angularjs > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2p

[web2py] Re: Web2py ajax call and Angularjs

2014-09-17 Thread olivier hubert
is trying the same thing or got some hints for me?. > I cannot find any examples of how use web2py ajax (or jquer ajax) with > angularjs > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.googl

[web2py] Re: Web2py ajax call and Angularjs

2014-09-16 Thread Leonel Câmara
I don't know angular, but I don't think you're supposed to just call that stuff directly, you can use jquery ajax, but you need to put the call in a Factory or Service or another one of those bullshits angular loves and then you put it in the scope. -- Resources: - http://web2py.com - http://w

[web2py] Web2py ajax call and Angularjs

2014-09-16 Thread piero crisci
instead properly into main pages. Anyone is trying the same thing or got some hints for me?. I cannot find any examples of how use web2py ajax (or jquer ajax) with angularjs -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code

[web2py] ajax login, wrong password redirects to wrong page

2014-08-29 Thread Maciej S
Some time ago I posted question on stackoverflow, and I still don't have a solution. I haven't found solution on the google mail list. Could someone help me: http://stackoverflow.com/questions/21433391/web2py-ajax-login-wrong-password-redirects-to-wrong-page -- Resources: - http://

[web2py] ajax posts text input twice when name and id are identical

2014-08-06 Thread Cliff Kachinske
This is not supposed to happen and I don't know why it did. The js looks like this: $('#products_on_order').on('click', '.edit_bound_container', function(e){ //alert(this.id); var container_id = this.id.split('__')[1] var count_field = 'bound_container_count_edit__' + con

[web2py] AJAX function

2014-07-25 Thread wdtnh
I've got a fairly substantial page with a lot of data in it that I don't want to keep reloading the page so I'm using the AJAX function provided with web2py and pulling the data from a SQLFORM used in the view page. Question I have is, I'm using validate_and_insert function, I was wondering is

[web2py] AJAX and sessions

2014-06-21 Thread Mark Graves
Hey Everyone, I have a question about session.forget(response) I've got an application to filter an inventory across multiple categories. Each filter works independently, however, one appears buggy. It sends data on keyup. As long as this data is entered in slow enough, the filters update pro

[web2py] ajax based cascading drop down menus not working in internet explorer

2014-06-18 Thread Sarbjit
I am using the web2py slice from http://www.web2pyslices.com/slice/show/1526/cascading-drop-down-lists-with-ajax-2. I noticed that the second drop down is getting populated correctly on firefox but on internet explorer, it is not working (Tested on IE9). I verified that on IE, on changing the v

[web2py] Ajax LOAD

2014-05-20 Thread Jesse Ferguson
Im trying to wrap my head around web2py and AJAX, I can use it to load a page.html however Its a little unclear to me when or how to use the page.load. For example, say I have a table of database items and I want to check that table every x amount of seconds and add a new element but only if i

[web2py] AJAX component reload problem using .html vs .load

2014-02-23 Thread Dan M
In the following code, when pressing the "X" link, the row and DIV are deleted and the component is refreshed in the controller function stat_del(). This only works when the loaded component is named ".html" rather than ".load" So this code works but the ".load" naming does not work.

[web2py] Re: Fixing web2py ajax call changing controller

2014-01-31 Thread Anthony
Something like this (not tested): $(function() { $('select[name=account_list]').on('change', function() { $.web2py.component('{{=URL('positions2', 'component_grid.load')}}' + '?account=' + this.value, target='grid'); }); }); {{=select_account_list}} {{=LOAD('posit

[web2py] Re: Fixing web2py ajax call changing controller

2014-01-31 Thread A36_Marty
Thank you for your response. I've got components working and have a couple of follow-up questions -- mainly due to my ignorance and novice web2py abilities. 1) I see a args and vars option on the view-side component LOAD() function for the component; however, I'm having trouble with the view s

[web2py] Re: Fixing web2py ajax call changing controller

2014-01-31 Thread Anthony
You shouldn't try to create the same grid using two different actions. Links are generated by the grid assuming the links should point back to the same action that generated the grid. Instead, it might work better to generate the initial grid on the index page via Ajax. The easiest method would

[web2py] Fixing web2py ajax call changing controller

2014-01-31 Thread A36_Marty
def index(): select_list = (Create a SELECT of options with the _onchange="ajax('ajax_requery',['selectlist'],'div_grid') grid = SQLFORM.grid(...) div_grid = DIV(grid, _id="div_grid") return dict(div_grid = div_grid, select_list=select_list) def ajax_requery(): #cal

[web2py] Re: web2py ajax failing when behind reverse proxy

2013-11-15 Thread Anthony
Also, note that if you call redirect(..., client_side=True), web2py will send the redirect URL in a special "web2py-redirect-location" HTTP header, which will be read by the JS code in web2py.js. Also, when web2py makes an Ajax call to load a component, it passes the URL of the parent page in a

[web2py] Re: web2py ajax failing when behind reverse proxy

2013-11-15 Thread DeanK
Awesome. I was trying to use mod_substitute to replace the url in the data tag but things weren't loading right. Anthony's suggestions worked. I'm going to do some more extensive testing, but at first glance it looks like that did the trick. Thanks! On Friday, November 15, 2013 10:44:34 A

[web2py] Re: web2py ajax failing when behind reverse proxy

2013-11-15 Thread Anthony
Does it work if you add the following to your proxy_html.conf file: ProxyHTMLLinks div data-w2p_remote See http://httpd.apache.org/docs/current/mod/mod_proxy_html.html#proxyhtmllinks and http://apache.webthing.com/svn/apache/filters/proxy_html/proxy_html.conf. Anthony On Thursd

[web2py] Re: web2py ajax failing when behind reverse proxy

2013-11-15 Thread Massimo Di Pierro
I opened a ticket about. Clearly storing URLs in data attributes gets ignored by Proxies. On Thursday, 14 November 2013 17:46:42 UTC-6, DeanK wrote: > > I'm having trouble with a web2py site sitting behind an Apache2 reverse > proxy that uses web2py's built in ajax capability. The main domain s

[web2py] web2py ajax failing when behind reverse proxy

2013-11-14 Thread DeanK
I'm having trouble with a web2py site sitting behind an Apache2 reverse proxy that uses web2py's built in ajax capability. The main domain server configuration is setup like this to point to the server running my web2py app: ProxyHTMLInterp On LogLevel Debug ProxyHTMLLogVerbose On ProxyPass /l

[web2py] Ajax function

2013-11-13 Thread Luca Dalla Palma
Hello, this is my *view* on the *controller *I build a function containing the folowing code: pippone='ciao' stringa.append("jQuery('#paginatore').html('%s');" % pippone()) print pippone return stringa The console says ciao (the HTML generated appears to be right) When the function returns, I

[web2py] ajax function is not called when passing non-ascii characters as arguments

2013-09-20 Thread Dragan Matic
On my page I have a set of links (page types) that loads its content dynamically when user clicks on the link. Clicking on each link calls a "LoadPage" javaScript function that calls python function that loads page content and puts it in "pageType" DIV. function LoadPage(pageType) {

Re: [web2py] Ajax via onclick or http via redirect for link tracking of external links

2013-09-12 Thread Vinicius Assef
I prefer the 1st one. On Thu, Sep 12, 2013 at 8:58 AM, Tim Richardson wrote: > Not strictly a web2py question. > We have an app which serves embedded videos to identified, logged in users. > The videos are hosted on vimeo. We'd like to know if a user clicks on a > link, and record that in a table

[web2py] Ajax via onclick or http via redirect for link tracking of external links

2013-09-12 Thread Tim Richardson
Not strictly a web2py question. We have an app which serves embedded videos to identified, logged in users. The videos are hosted on vimeo. We'd like to know if a user clicks on a link, and record that in a table. I could send the link destination back to a web2py controller function which woul

[web2py] Ajax input masks

2013-08-19 Thread Warren Block
Hello. I'm just starting to dig into web2py. One thing I really want is field input masks ala Visual Foxpro, to prevent users from entering invalid characters rather than validating afterwards and telling them they made a mistake. For example, if a user types alpha characters into a numeric-

[web2py] ajax() infinite loop

2013-08-01 Thread Marco Prosperi
hello, I would like to update the total in the view below (bottom of the message) when the user changes quantity. The following script works fine (fixed value) jQuery(document).ready(function(){ $(document).ajaxStop(function(){ jQuery('#910').slideToggle(); jQuery('#910').html('

[web2py] Ajax auto-populating doesn't work with update form

2013-06-22 Thread lesssugar
I have 2 select boxes. I managed to auto-populate second select box based on value from the first one. All of the code below works just fine when I create new record - second select is being populated. However, when I try to update the same record, select_2 does not get populated, as if the * de

[web2py] Ajax function and returning Row, not string

2013-06-18 Thread lesssugar
I'm building a cascading dropdown lists. I use web2py ajax function to do it. My code: select 1 (parent): {{=OPTION('-- Choose department --', _value="")}} {{for d in departments:}} {{=OPTION(d.name, _value=d.id)}} {{pass}} sel

[web2py] Ajax-form-submission: pass ALL form-elements

2013-05-31 Thread D.
Dear community, I'm using ajax to submit a form: $("#myform").submit(function() { ... ajax("{{=URL("do_stuff", user_signature=True)}}", ["element1", "element2", ...], "target"); return false; } This works very well. However, when #myform has many elements or is created/modified dynamically,

[web2py] ajax function in a grid, I'm getting None in a request.vars

2013-03-29 Thread Tim Richardson
I'm trying to learn more about LOAD and ajax. I have an SQLFORM.grid loaded as a component. It's read only. I've added a button to each row using links = [lambda row: INPUT(_name='toggle',_type="submit",_value="Toggle", _onclick="ajax('toggle_order_import_v2',['id'

Re: [web2py] Ajax return a form but does not write in the db (and default value info)

2013-03-07 Thread Richard Vézina
I get back to you as soon as I can... I a bit busy rigth now. Richard On Thu, Mar 7, 2013 at 12:27 PM, Riccardo C wrote: > *index.html* > bla bla bla... > > {{=LOAD('default','maintxt.load',target='chat')}} > > bla bla bla... > > maintxt.load > {{=form}} > > {{for msg in msgList:}} > > {{=

Re: [web2py] Ajax return a form but does not write in the db (and default value info)

2013-03-07 Thread Riccardo C
*index.html* bla bla bla... {{=LOAD('default','maintxt.load',target='chat')}} bla bla bla... maintxt.load {{=form}} {{for msg in msgList:}} {{=msg.body}} show thread and reply {{pass}} replies.load {{for msg in replyList:}} {{=LI(I(msg.body+' @ '+str(msg.submitdate), _class='rispost

Re: [web2py] Ajax return a form but does not write in the db (and default value info)

2013-03-07 Thread Richard Vézina
Could you show more code, controller for both component and the views associated Richard On Wed, Mar 6, 2013 at 4:49 PM, Riccardo C wrote: > Thank you very much, that is exactly what I needed... I didn't know > components! > > I have component related question know. > I have a first component

Re: [web2py] Ajax return a form but does not write in the db (and default value info)

2013-03-06 Thread Riccardo C
Thank you very much, that is exactly what I needed... I didn't know components! I have component related question know. I have a first component that generate the first form (form1) based on tableA and a second component that list all the post and a second form (form2) generate on the same tab

Re: [web2py] Ajax return a form but does not write in the db (and default value info)

2013-02-28 Thread Richard Vézina
Should read : # Your insert form {{=form}} {{=LOAD(..., yourFunctionThatListThePost, ...)}} On Thu, Feb 28, 2013 at 4:47 PM, Richard Vézina wrote: > I don't understand your problem very well... Do you have a problem > refreshing the post? As far as I understand, you have write your own aja

Re: [web2py] Ajax return a form but does not write in the db (and default value info)

2013-02-28 Thread Richard Vézina
I don't understand your problem very well... Do you have a problem refreshing the post? As far as I understand, you have write your own ajax call to update the stuff in your page... You could try someting like that in your view (read about web2py LOAD() and component) : # Your insert form {{=form

[web2py] Ajax return a form but does not write in the db (and default value info)

2013-02-28 Thread Riccardo C
Good evening, I am trying to do a very simple 'twitter like' message board with the simple aim to learn to program and get used to web2py framework. The problem is that I decided (I don't know if it is the best choice) to use one single table for both the new messages and the answers. What I d

Re: [web2py] ajax callback not work in form()

2013-02-28 Thread 黄祥
hi philip, Have you experimented with LOAD and components? > > never, i just ever learn from book and test it, never modified so far using components. i've already follow all your suggestion since it's still not work (no errors occured) : here is my update : * default.py (not worked with erro

Re: [web2py] ajax callback not work in form()

2013-02-28 Thread Philip Kilner
Hi, On 28/02/13 08:13, 黄祥 wrote: 1. if i use sqlform.factory the submit button will be automatic generated but not used it, isn't it? You can customise that, as per the custom forms section in the book. 2. if using form custom, the form action can't be modified, because i want to add and sto

Re: [web2py] ajax callback not work in form()

2013-02-28 Thread 黄祥
hi philip, back to ajax again, hm, i'm confused right now, hehe... 1. if i use sqlform.factory the submit button will be automatic generated but not used it, isn't it? 2. if using form custom, the form action can't be modified, because i want to add and store the user input quantity in the fiel

Re: [web2py] ajax callback not work in form()

2013-02-27 Thread Philip Kilner
Hi Stifan, On 28/02/13 07:44, 黄祥 wrote: a, i c, i get it to use sqlform.factory and if form accepted store it in session for id and quantity, the main problem is in my view i make a condition for view as grid or view as list, i don't think it can be done by sqlform, since the form place is verti

Re: [web2py] ajax callback not work in form()

2013-02-27 Thread 黄祥
a, i c, i get it to use sqlform.factory and if form accepted store it in session for id and quantity, the main problem is in my view i make a condition for view as grid or view as list, i don't think it can be done by sqlform, since the form place is vertical, not horizontal, if you use the lis

Re: [web2py] ajax callback not work in form()

2013-02-27 Thread Philip Kilner
Hi, On 28/02/13 07:28, 黄祥 wrote: thank you so much for your recommendation, i think sqlform will store it into database table not in session It will - but you can use SQLFORM.factory to get the benefit of web2py's form processing without using the db: - http://web2py.com/books/default/chap

Re: [web2py] ajax callback not work in form()

2013-02-27 Thread 黄祥
hi philip kilner, thank you so much for your recommendation, i think sqlform will store it into database table not in session, so that i'm not using it, because i want to pull everything that user input first (using session), before they checkout. i've tried a lot of things in here, such as, pu

Re: [web2py] ajax callback not work in form()

2013-02-27 Thread Philip Kilner
Hi, On 28/02/13 07:01, 黄祥 wrote: do you have any hints, correction or suggestion about this things? I'd very strongly recommend using SQLFORM rather than rolling your own forms, and components + LOAD rather than rolling your own Ajax. Doing this stuff by hand is do-able but fiddly and tedi

Re: [web2py] ajax callback not work in form()

2013-02-27 Thread 黄祥
hi Philip Kilner, actually, i'm just want to create the application shopping cart base on pos online store that i've downloaded in web2py appliances. the things that i asked here is that i want to modified the user can input the quantity in form input and then add it into shopping cart (store i

Re: [web2py] ajax callback not work in form()

2013-02-27 Thread Philip Kilner
Hi, On 28/02/13 05:54, 黄祥 wrote: i've tried to learn ajax callback using form(), but it's not work (no error occured), did anyone know the solution for this? thank you very much before I'm having a little trouble understanding what you are doing here - I would definitely use the tools that w

[web2py] ajax callback not work in form()

2013-02-27 Thread 黄祥
hi, i've tried to learn ajax callback using form(), but it's not work (no error occured), did anyone know the solution for this? thank you very much before here is my code: *#controller* def order_callback(): id=int(request.vars.id) quantity=int(request.vars.quantity) if request.vars

[web2py] ajax choking on text - need help

2013-02-23 Thread Cliff Kachinske
Is your Web2py source file encoded UTF8? Have you tried prefacing the string with a lowercase 'u' for unicode? -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email

[web2py] ajax choking on text - need help

2013-02-23 Thread weheh
I'm doing an ajax callback that's supposed to update a div with new text: # action ... return 'jQuery("#my-target").html("%s");' % clean_str(make_contents(filename )) def make_contents(filename): return open(filename, 'rb').read().decode('utf-8') def clean_str(text): return str(text).r

[web2py] ajax update session data

2013-02-19 Thread 黄祥
hi, i'm trying to update session data variable using java and not working. for example : *#controller* def order_update(): id=int(request.vars.id) qty=int(request.vars.qty) #session.order.get(id, 0)=qty session.order[id]=qty return locals() *#view* {{for id, qty in order.ite

[web2py] Re: Web2py Ajax Problem

2013-02-04 Thread Apoorve Mohan
Thanks Anthonyit worked On Sunday, February 3, 2013 7:46:18 PM UTC+5:30, Anthony wrote: > > See answer to similar issue here: > https://groups.google.com/d/msg/web2py/a8Ovzh__x9o/_d7rckBpg9QJ > > Anthony > > On Sunday, February 3, 2013 5:54:00 AM UTC-5, Apoorve Mohan wrote: >> >> Hi >> >> I a

[web2py] Re: Web2py Ajax Problem

2013-02-03 Thread Anthony
See answer to similar issue here: https://groups.google.com/d/msg/web2py/a8Ovzh__x9o/_d7rckBpg9QJ Anthony On Sunday, February 3, 2013 5:54:00 AM UTC-5, Apoorve Mohan wrote: > > Hi > > I am firing Ajax calls from a webpage. If any AJAX call hangs in between > then the others also hangs until the

[web2py] Web2py Ajax Problem

2013-02-03 Thread Apoorve Mohan
Hi I am firing Ajax calls from a webpage. If any AJAX call hangs in between then the others also hangs until the hanged AJAX returns. Is this a Web2py Bug or my applications bug Below is my code: {{extend 'layout.html'}} setInterval(test1,1000); function test1() { ajax('{{=URL(

[web2py] Ajax / cid with A helper not working

2012-10-19 Thread lyn2py
I looking at web2py book here: http://web2py.com/books/default/chapter/34/05 Tha A helper takes a special argument called cid. It works as follows: > {{=A('linked page', _href='http://example.com', cid='myid')}} > > > and a click on the link causes the content to be loaded in the div. This > is

  1   2   3   >