You are missing quotes jQuery('#no_table_ip').attr('width', '800px')
On Monday, 1 October 2012 09:30:41 UTC-5, CrC wrote: > > > Hello everybody, I am a newbie in web2py and I got stuck with CSS and > SQLFORM.factory. > I'm trying to change the width of one SQLFORM's field, but I can't!!! > > this is my SQLFORM definition: > form = SQLFORM.factory(Field('ip', 'string', > widget=SQLFORM.widgets.text.widget), > Field('date', requires=IS_DATE(format=T('%d-%m-%y'), > error_message='must be DD-MM-YY'), readable=False, writable=False), > Field('csvfile', 'upload', uploadfolder=uploaddir)) > > and the view: > {{extend 'layout.html'}} > {{=form}} > <script> > jQuery(document).ready(function(){ > jQuery('#no_table_ip').attr(width, 800px) > }); > </script> > > Any help? > > Thank you very much. --