jQWidgets Forums
jQuery UI Widgets › Forums › General Discussions › Dialogs and Notifications › Window › Jqxwindow with backbone.js
Tagged: jqxwindow
This topic contains 2 replies, has 2 voices, and was last updated by pushpendra 12 years, 1 month ago.
-
Author
-
Hi,
I am using backbone.js with jqwidgets.
My technology version is as:
Backbone.js 0.9.10 and
jQWidgets v2.6.1
After opening jqxwindow to submit a form, its save button fires event more than once.
Please help me.
Thanks in advance.
Hi pushpendra,
Make sure that your button is binded only once to the event. If you still have a problem provide us with an example and we will gladly help you.
Best Wishes,
MariyajQWidgets Team
http://www.jqwidgets.comHi,
This is the code i am using:
$(‘#ok_edit’).bind(‘click’, function (event) {
var editrow = null;//declare to have null initillay….
var chart_type_id_edit = null;
var tax_rate_id_edit = null;
var code_edit = null;
var name_edit = null;
var description_edit = null;
var id_edit = null;chart_type_id_edit = $(“#chart_type_id_edit”).jqxComboBox(‘getSelectedItem’).label;
tax_rate_id_edit = $(“#tax_rate_id_edit”).jqxComboBox(‘getSelectedItem’).label;
code_edit = $(‘#code_edit’).val();
name_edit = $(‘#name_edit’).val();
description_edit = $(‘#description_edit’).val();
id_edit = $(‘#id_edit’).val();var row = new Object();
row[“id”] =dataRecord.id;
row[“item”] = false;
row[“chart_code”] = code_edit;
row[“chart_name”] = name_edit;
row[‘chart_type_name’] = chart_type_id_edit;
row[“chart_class_name”] = description_edit;
row[“tax_rate_name”] = tax_rate_id_edit;
editrow = self.event.args.rowindex;
if (editrow >= 0)
{
var mydata = self.save(dataRecord.id);//code to call save function ………………..}
var editrow = self.event.args.rowindex;
var gridid = “#”+self.event.target.id;
console.log(“event :”,gridid);
console.log(“index :”,editrow);
if (editrow >= 0)
{
// var datarow = generaterow();
var commit = $(gridid).jqxGrid(‘updaterow’, editrow, row);
$(gridid).jqxGrid(‘ensurerowvisible’, editrow);}
$(“#eventWindow6”).jqxWindow(‘hide’);});
-
AuthorPosts
You must be logged in to reply to this topic.