I would like to know how to solve VALIDATOR IS UNDEFINED error using jquery.validate.js.
firebug say the error in line 276
function delegate(event) {
274 var validator = $.data(this[0].form,
275 "validator");
276 validator.settings["on" + event.type]
277 && validator.settings["on"
278 + event.type].call(
279 validator, this[0]);
can anyone know how to solve this kind of error
my javascript code is - jQuery('#cost').editable(function(value, settings) {
-
jQuery('[name=<portlet:namespace />cost]').val(value);
-
return(value);
-
},
-
{
-
type : 'textarea',
-
width : '100px',
-
submit : 'Update',
-
cssclass: 'formEdit'
-
});
5 3008
Did you mean this.form[0] instead of this[0].form?
@acoder
var validator = $.data(this[0].form, "validator");
is code from the jquery.validate.js.
so I think we don't need to modified this code and i think we need to pass suitable variable to that method.
please give some advice if u know about this.
i can't fix this issue still now.
Thanks and Regards,
Yan Paing
I see. Post your HTML code.
My jsp code is - <script type="text/javascript">
-
-
jQuery(document).ready(function() {
-
-
var currentVisibleDetailBlock = null;
-
-
jQuery('.pplDetail').hide();
-
jQuery('span.linkDetail a').click(function() {
-
var blockDetail = jQuery(this).parent().siblings(".pplDetail");
-
var visible = blockDetail.css("display") == "block";
-
if (visible) { blockDetail.slideUp('slow'); currentVisibleDetailBlock = null; }
-
else {
-
if (currentVisibleDetailBlock != null) { currentVisibleDetailBlock.slideUp('slow', function() {
-
blockDetail.slideDown('slow');}) }
-
else { blockDetail.slideDown('slow'); }
-
currentVisibleDetailBlock = blockDetail; } });
-
-
-
jQuery('#description').editable(function(value, settings) {
-
jQuery('[name=<portlet:namespace />description]').val(value);
-
return(value);
-
},
-
{
-
type : 'textarea',
-
height : '80px',
-
width : '200px',
-
submit : 'Update',
-
cssclass: 'formEdit'
-
});
-
-
-
jQuery('#type').editable(function(value, settings) {
-
jQuery('[name=<portlet:namespace />type]').val(value);
-
return(value);
-
},
-
{
-
type : 'select',
-
submit : 'Update',
-
cssclass: 'formEdit',
-
data : " {'Individual':'Individual','Corporate':'Corporate','Partners':'Partners','Hybrid':'Hybrid','selected':'<%= (record != null) ? record.getType() : "" %>'}"
-
});
-
-
jQuery('#status').editable(function(value, settings) {
-
jQuery('[name=<portlet:namespace />status]').val(value);
-
return(value);
-
},
-
{
-
type : 'select',
-
submit : 'Update',
-
cssclass: 'formEdit',
-
data : " {'Enable':'Enable','Disable':'Disable','selected':'<%= (record != null) ? record.getStatus() : "" %>'}"
-
});
-
-
-
jQuery('#version').editable(function(value, settings) {
-
jQuery('[name=<portlet:namespace />version]').val(value);
-
return(value);
-
},
-
{
-
type : 'textarea',
-
submit : 'Update',
-
width : '200px',
-
cssclass: 'formEdit'
-
});
-
-
jQuery('#cost').editable(function(value, settings) {
-
jQuery('[name=<portlet:namespace />cost]').val(value);
-
return(value);
-
},
-
{
-
type : 'textarea',
-
width : '100px',
-
submit : 'Update',
-
cssclass: 'formEdit'
-
});
-
-
jQuery('#costCurrency').editable(function(value, settings) {
-
jQuery('[name=<portlet:namespace />costCurrency]').val(value);
-
return(value);
-
},
-
{
-
type : 'select',
-
submit : 'Update',
-
cssclass: 'formEdit',
-
data : " {'SGD':'SGD','selected':'<%= (record != null) ? record.getCostCurrency() : "" %>'}"
-
});
-
-
jQuery('#costPeriod').editable(function(value, settings) {
-
jQuery('[name=<portlet:namespace />costPeriod]').val(value);
-
return(value);
-
},
-
{
-
type : 'textarea',
-
submit : 'Update',
-
width : '200px',
-
cssclass: 'formEdit'
-
});
-
-
jQuery('#costPeriodType').editable(function(value, settings) {
-
jQuery('[name=<portlet:namespace />costPeriodType]').val(value);
-
return(value);
-
},
-
{
-
type : 'select',
-
submit : 'Update',
-
cssclass: 'formEdit',
-
data : " {'Weekly':'Weekly','Monthly':'Monthly','selected':'<%= (record != null) ? record.getCostPeriodType() : "" %>'}"
-
});
-
-
jQuery('#promotionCode').editable(function(value, settings) {
-
jQuery('[name=<portlet:namespace />promotionCode]').val(value);
-
return(value);
-
},
-
{
-
type : 'textarea',
-
submit : 'Update',
-
width : '200px',
-
cssclass: 'formEdit'
-
});
-
-
jQuery('#discount').editable(function(value, settings) {
-
jQuery('[name=<portlet:namespace />discount]').val(value);
-
return(value);
-
},
-
{
-
type : 'textarea',
-
width : '100px',
-
submit : 'Update',
-
cssclass: 'formEdit'
-
});
-
-
-
});
-
</script>
-
...
-
...
-
-
...
-
-
..
-
-
....
-
-
-
<tr class="portlet-section-body results-row alt">
-
<td><b><label for="cost_label_1">Price</label></b><font color="red">*</font></td>
-
<td>
-
<div id="costCurrency" style="display:inline"><%= record.getCostCurrency() %></div>
-
<input type="hidden" name="<portlet:namespace />costCurrency" value="<%= record.getCostCurrency() %>" maxlength="75" class="required"/>
-
-
<div id="cost" style="display:inline"><%= record.getCost() %></div>
-
<input type="hidden" name="<portlet:namespace />cost" value="<%= record.getCost() %>"/>
-
-
<div id="costPeriodType" style="display:inline"><%= record.getCostPeriodType() %></div>
-
<input type="hidden" name="<portlet:namespace />costPeriodType" value="<%= record.getCostPeriodType() %>" class="required"/>
-
</td>
-
</tr>
Just so that we know we're talking about the same thing: are you using this plugin?
Sign in to post your reply or Sign up for a free account.
Similar topics
by: mikeh3275 |
last post by:
I'm new to developing in jQuery, so I'm probably doing this wrong. I'm loading a form into a modal dialog box and I'm trying to assign a click event to the button in the form, but I can't seem to...
|
by: thj |
last post by:
Hi.
I've got this form that I'm trying to validate:
<form id="periodForm" action="" method="post">
<p>
Periode:
<input id="startDate" name="startDate" type="text" size="7"
value="<%=...
|
by: RobG |
last post by:
Do some of the regulars here need to re-think their (sometimes
strident) opposition to libraries? Both Microsoft and Nokia have
announced support for jQuery.
It seems to have gained quite a bit...
|
by: souporpower |
last post by:
Hello All
I am trying to activate a link using Jquery. Here is my code;
<html>
<head>
<script type="text/javascript" src="../../resources/js/
jquery-1.2.6.js"</script>
<script...
|
by: pradeepjain |
last post by:
hii.. i use cope like this
<td><a href='/login.php' id="view-user" >Pradeep</a></td>
and defauly jquery dialog code
<script type="text/javascript">
$(function() {...
|
by: amskape |
last post by:
hi Friends,
I need to Upload some files in a Listing , by clicking
corresponding Upload link, then a popup window will
come with Browse option as Shown in attachment File.
My actual need is...
|
by: juganta |
last post by:
How do I validate dropdown list in jquery
|
by: oranoos3000 |
last post by:
hi
can i change id attribute an element with below command in jquery
$("#error").attr("id", "warning");
i know this code is not reasonable but i want to know change id's element after...
|
by: omar999 |
last post by:
hi guys
i really dont understand where i am going wrong.I've read countless articles including http://blog.nemikor.com/2009/10/03/using-multiple-versions-of-jquery/ but still having trouble with...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |