Are you using a version of jQuery earlier than 1.7?

On Wednesday, September 5, 2012 9:27:02 AM UTC-4, Johann Spies wrote:
>
> Using Version 2.0.7 (2012-09-04 18:33:19) stable:
>
> I get this error on the Firebug console:
>
> Timestamp: 05/09/2012 15:22:54
> Error: TypeError: doc.on is not a function
> Source File: http://localhost:8000/init/static/js/web2py.js
> Line: 42
>
> The code:
>
> function web2py_event_handlers() {
>  var doc = jQuery(document)
>  doc.on('click', '.flash', function(e){jQuery(this).fadeOut('slow'); e.
> preventDefault();});
>  doc.on('keyup', 'input.integer', function(){this.value=this.value.reverse
> ().replace(/[^0-9\-]|\-(?=.)/g,'').reverse();});
>  doc.on('keyup', 'input.double, input.decimal', function(){this.value=this
> .value.reverse().replace(/[^0-9\-\.,]|[\-](?=.)|[\.,](?=[0-9]*[\.,])/g,''
> ).reverse();});
>  var confirm_message = (typeof w2p_ajax_confirm_message != 'undefined') 
> ?w2p_ajax_confirm_message 
> : "Are you sure you want to delete this object?";
>  doc.on('click', "input[type='checkbox'].delete", function(){if(this.
> checked) if(!confirm(confirm_message)) this.checked=false;});
>  doc.ajaxSuccess(function(e, xhr) {
>  var redirect=xhr.getResponseHeader('web2py-redirect-location');
>  if (redirect != null) {
>  window.location = redirect;
>  };
>  });
>
>
>
> I also noticed this morning that the flash ("Success") did not fade away 
> after filling in a form.  I suspect it has something to do with this 
> problem.
>
>
> and 
>
> Timestamp: 05/09/2012 15:22:54
> Error: TypeError: a("body").on is not a function
> Source File: http://localhost:8000/init/static/js/bootstrap.min.js
> Line: 6
>
>
> Regards
> Johann
>

-- 



Reply via email to