Check the source of the returned page, is it still good?.

The code is:

def CALBOX(*args, **vars):
  vars['_type']='text'
  vars['_data-role']='datebox'
  vars['data']={'options':XML('{"mode":"calbox", "useNewStyle":true}')}
  x = INPUT(*args, **vars)
  return XML(x.xml().replace('"{', "'{").replace('}"', "}'"))

CALBOX(_name='tsdate', _id='tsdate')

which should give (and it looks like that if you inspect the element):

<input id="tsdate" class="ui-input-text ui-body-c ui-shadow-inset 
ui-corner-all ui-icon-datebox" type="text" name="tsdate" 
data-role="datebox" data-options="{"mode":"calbox", "useNewStyle":true}" 
readonly="readonly"></input>

but the source says:

<input readonly="readonly" class="ui-input-text ui-body-c ui-shadow-inset 
ui-corner-all ui-icon-datebox" 
data-options="{&quot;mode&quot;:&quot;calbox&quot;, 
&quot;useNewStyle&quot;:true}" data-role="datebox" id="tsdate" name="tsdate" 
type="text">


which obviously does not work.
Grrr.




On Monday, October 28, 2013 11:36:33 AM UTC-4, Anthony wrote:
>
>
>
> On Monday, October 28, 2013 10:46:30 AM UTC-4, DenesL wrote:
>>
>> Thanks Anthony, it sounds like a good idea but the browser ends up 
>> receiving:
>>
>> data-options="{&quot;mode&quot;:&quot;calbox&quot;, 
>> &quot;useNewStyle&quot;:true}"
>>
>>
> When I try it, web2py returns the following to the browser:
>
> <input data-options='{"mode":"calbox"}' name="test" type="text" />
>
> Can you show your exact code?
>
> Anthony
>

-- 
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/groups/opt_out.

Reply via email to