In the view something like that :
$( document ).ready(function() {
$('input#id').bsmselect(...);
});
It can be pass to the view from the controller, as you want... So you will
need to do something like that :
{{=XML(your_pass_js_script)}}
:)
Richard
On Fri, Dec 13, 2013 at 6:38 PM,
I forget... Don' forget to surround with script/script tag...
script
{{=XML(your_pass_js_script)}}
/script
On Sat, Dec 14, 2013 at 3:17 PM, Richard Vézina ml.richard.vez...@gmail.com
wrote:
In the view something like that :
$( document ).ready(function() {
thanks but to be honest now I'm even more confused.
why do you need a piece of jquery code in a javascript variable. I sopose
you included the entire jquery library.
Why do you do the ordering with javascript and not with python is there a
special reason for this? I think I just explained the last
I am sorry about that...
Web2py default behavior for list:reference or reference is a HTML Select
and option... This is ordered by the navigator base on the spelling of the
element... So when you edit your form if you want to maintain the
preexisting order (the one that were there when you select
Thanks it explains a lot. I will try to work on it as soon as I got the
time. Unfortunatly we got a deadline at work which is Christmas. So I will
probably not work on it till than.
On Fri, Dec 13, 2013 at 3:53 PM, Richard Vézina ml.richard.vez...@gmail.com
wrote:
I am sorry about that...
Well actually I got one more question: How do you change the standard form
from web2py, to use the bsmselect form?
On Fri, Dec 13, 2013 at 4:18 PM, Kevin Bethke kevin.bet...@gmail.comwrote:
Thanks it explains a lot. I will try to work on it as soon as I got the
time. Unfortunatly we got a
You init the js on the field!!
Richard
On Fri, Dec 13, 2013 at 10:20 AM, Kevin Bethke kevin.bet...@gmail.comwrote:
Well actually I got one more question: How do you change the standard form
from web2py, to use the bsmselect form?
On Fri, Dec 13, 2013 at 4:18 PM, Kevin Bethke
sorry to hop in and ask a silly question but, when you say init the js on
the field how is that supposed to be done in web2py? Is it done in the
view? would it be ideal to put the js in the template and then pass params?
any named optional attribute is passed to the form tag
for
thanks for your offer I'm working my way through the example code but my
biggest problem is that php site. I don't know php. But from what I get
from the php code is that all the sample cities need to be in an unordered
list environment ulli/li.../ul
but this form part of the bsmselect example
Don't bother with the php thing...
Just look the data structure of the select...
Here what I do to restore proper order on update form :
controller_view_js +=
var ordered_values = ''%s'';
$(document).ready(function() {
if(ordered_values != None) {
$.each(ordered_values, function(i,
It's a bit hacky but it works...
:)
Richard
On Thu, Dec 12, 2013 at 9:48 AM, Richard Vézina ml.richard.vez...@gmail.com
wrote:
Don't bother with the php thing...
Just look the data structure of the select...
Here what I do to restore proper order on update form :
controller_view_js +=
11 matches
Mail list logo