are you aware that ajax('new' ['id'], 'ab') it takes all input with name = 
id and pass those as an argument ?

On Friday, May 16, 2014 7:27:47 AM UTC+2, LaDarrius Stewart wrote:
>
> Im loading a component from a grid with a button you can see the code 
> below in grid "links=links". My issue is the first time I press the button 
> everything is fine the pages collapse etc etc the component loads. Then if 
> i press another button from the grid im getting a strange error(Seen 
> below). The crazy thing about the error is whats causing the issue is when 
> I pass the SQLFORM a record value(See below). It gives me the following 
> error it seems as if its concatenating the ids. If I take the record value 
> off the form I no longer receive the error. I've been stuck on this for 
> hours I cant see why making this a edit FORM destroys the code. If I take 
> the record value you out im able to click the buttons fine a million times 
> no issue. As soon as the record value is in place it goes haywire =[
>
> Error Message:
>  "<type 'exceptions.ValueError'> invalid literal for long() with base 10: 
> '|19193|860|860|'"
>
> form:
> a = request.args(0)
> form=SQLFORM(db.Company,a, formstyle="bootstrap")
>
> grid link:
> links = [lambda row: BUTTON('Profile',_onclick="jQuery('#id5').val('%s'); 
> ajax('new', ['id'], 'ab');" % str(row.id), **{'_data-toggle': 'collapse', 
> '_data-target' : '#ab', '_class' : 'two btn btn-success', '_type' : 
> 'submit', '_value' : 'Submit', '_id' : 'ld'} )]
>

-- 
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 you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to