Item12462: Using FormPlugin JavaScript parameters produces an error

pencil
Priority: Urgent
Current State: New
Released In: n/a
Target Release:
Applies To: Extension
Component: FormPlugin
Branches:
Reported By: MyqLarson
Waiting For:
Last Change By: GjFulk
Look at samples in Sandbox. JavaScript console reports:

Uncaught TypeError: Object blur has no method 'call' jquery-1.8.2.uncompressed.js:611
jQuery.extend.each                                   jquery-1.8.2.uncompressed.js:611
jQuery.fn.jQuery.each                                jquery-1.8.2.uncompressed.js:241
$jQlq.run                                            jquery.livequery.uncompressed.js:106
$.extend.livequery                                   jquery.livequery.uncompressed.js:33
(anonymous function) FormPluginExamples:248
fire                                                 jquery-1.8.2.uncompressed.js:974
self.fireWith                                        jquery-1.8.2.uncompressed.js:1082
jQuery.extend.ready                                  jquery-1.8.2.uncompressed.js:406
DOMContentLoaded                                     jquery-1.8.2.uncompressed.js:83

It doesn't matter which JavaScript parameters you use, they all produce errors on fresh 1.1.8 install with FormPlugin installed using the latest jQuery.

Workaround

The problem I believe is related to Item11993. To fix, change .livequery to .live in file templates/formplugin.tmpl line 66.

from:
}%%TMPL:DEF{formplugin:javascript:field}%$('form[name=$formname] [name=$fieldname]').livequery('$behaviour', function() {

to:
}%%TMPL:DEF{formplugin:javascript:field}%$('form[name=$formname] [name=$fieldname]').live('$behaviour', function() {

This appears to fix the Sandbox samples that use the javascript functions (See FormPlugin#Javascript_parameters) like onChange that were not working due to this problem.

-- GjFulk - 09 Nov 2013

 

ItemTemplate edit

Summary Using FormPlugin JavaScript parameters produces an error
ReportedBy MyqLarson
Codebase 1.1.8
SVN Range
AppliesTo Extension
Component FormPlugin
Priority Urgent
CurrentState New
WaitingFor
Checkins
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
Release01x01Checkins
Topic revision: r2 - 09 Nov 2013, GjFulk
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy