jQWidgets Forums
Forum Replies Created
-
Author
-
April 19, 2013 at 8:49 am in reply to: Tab content and JSP includes. Tab content and JSP includes. #19606
Hi,
I replace the iframe to the div, use the $(div).load(‘url’) to display my page. After i successful display my page, the tabs not allow me to add a new tabs. The error mention that $().jqxtabs() is not a function. so what is the problem that cause the error?April 19, 2013 at 1:32 am in reply to: Use div loading url in tabs div Use div loading url in tabs div #19588Do u have any email? i wan send u my sample code, since i dun know how to paste my code in this forum.
April 19, 2013 at 12:57 am in reply to: Use div loading url in tabs div Use div loading url in tabs div #19585The menu page html coding.
Tab 1
Appointments
My Calendar
TestingBoards
TestingKeysApril 19, 2013 at 12:54 am in reply to: Use div loading url in tabs div Use div loading url in tabs div #19584This is my sample code.
<!–
$(document).ready(function () {
// create jqxtabs.
$(‘#jqxtabs’).jqxTabs({showCloseButtons: true});
var tabOpened = [];
tabCounter = 2;
$(‘#tab-1’).load(“../” + id + “/” + “index”);
$(‘.menuItemName’).click(function() {
id = $(this).attr(“id”);
var identifier = true;for (var t=0;t< =tabOpened.length;t++){
if (id == tabOpened[t]){
identifier = false;
}
}if(identifier){ ;
tabsId = "tabs-" + tabCounter,
$('#jqxtabs').jqxTabs('addLast', id, '‘);
tabCounter++;}else{
alert(id + ” window already opened.”);}
});
});<!–
Tab 1
Appointments
My Calendar
TestingBoards
TestingKeys–>
<!–
$(document).ready(function () {
// prepare the data
var data = new Array();
var firstNames =
[
“Andrew”, “Nancy”, “Shelley”, “Regina”, “Yoshi”, “Antoni”, “Mayumi”, “Ian”, “Peter”, “Lars”, “Petra”, “Martin”, “Sven”, “Elio”, “Beate”, “Cheryl”, “Michael”, “Guylene”
];
var lastNames =
[
“Fuller”, “Davolio”, “Burke”, “Murphy”, “Nagase”, “Saavedra”, “Ohno”, “Devling”, “Wilson”, “Peterson”, “Winkler”, “Bein”, “Petersen”, “Rossi”, “Vileid”, “Saylor”, “Bjorn”, “Nodier”
];
var productNames =
[
“Black Tea”, “Green Tea”, “Caffe Espresso”, “Doubleshot Espresso”, “Caffe Latte”, “White Chocolate Mocha”, “Cramel Latte”, “Caffe Americano”, “Cappuccino”, “Espresso Truffle”, “Espresso con Panna”, “Peppermint Mocha Twist”
];
var priceValues =
[
“2.25”, “1.5”, “3.0”, “3.3”, “4.5”, “3.6”, “3.8”, “2.5”, “5.0”, “1.75”, “3.25”, “4.0”
];
for (var i = 0; i < 100; i++) {
var row = {};
var productindex = Math.floor(Math.random() * productNames.length);
var price = parseFloat(priceValues[productindex]);
var quantity = 1 + Math.round(Math.random() * 10);
row["firstname"] = firstNames[Math.floor(Math.random() * firstNames.length)];
row["lastname"] = lastNames[Math.floor(Math.random() * lastNames.length)];
row["productname"] = productNames[productindex];
row["price"] = price;
row["quantity"] = quantity;
row["total"] = price * quantity;
row["available"] = true;
data[i] = row;
}
var source =
{
localdata: data,
datatype: "array"
};
var dataAdapter = new $.jqx.dataAdapter(source, {
loadComplete: function (data) { },
loadError: function (xhr, status, error) { }
});
var columnCheckBox = null;
var updatingCheckState = false;
$("#jqxgrid").jqxGrid(
{
editable: true,
source: dataAdapter,
columns: [
{ text: '', datafield: 'available', columntype: 'checkbox', width: 30, renderer: function () {
return '‘;
},
rendered: function (element) {
$(element).jqxCheckBox({ width: 16, height: 16, animationShowDelay: 0, animationHideDelay: 0 });
columnCheckBox = $(element);
$(element).on(‘change’, function (event) {
var checked = event.args.checked;
if (checked == null || updatingCheckState) return;
var rowscount = $(“#jqxgrid”).jqxGrid(‘getdatainformation’).rowscount;
$(“#jqxgrid”).jqxGrid(‘beginupdate’);if (checked) {
$(“#jqxgrid”).jqxGrid(‘selectallrows’);
}
else if (checked == false) {
$(“#jqxgrid”).jqxGrid(‘clearselection’);
}for (var i = 0; i 0) {
$(columnCheckBox).jqxCheckBox(‘indeterminate’);
}
else {
$(columnCheckBox).jqxCheckBox(‘uncheck’);
}
updatingCheckState = false;
}
});
});–>
First, i display the main page and the tabs will included the testing Key page. The menu bar is allow the user click to display a new url, that mean it will added a new tabs to load a new url.
After i finished display the main page with the testing key page, that not allow me to add a new tabs when i click a menu item. The error mention that $(…).jqxTabs is not a function.
But when i remove the testing key page, it will added successfully without any error. So is that any conflict for the jquery?
April 18, 2013 at 9:14 am in reply to: Use div loading url in tabs div Use div loading url in tabs div #19519But when i load the url into the tabs, the jqxtabs had a conflict with other jqx library. So what method and solution that i can taken to solve it?
April 18, 2013 at 3:23 am in reply to: Integrate with Jquery UI Tabs Integrate with Jquery UI Tabs #19482I using a tabs to load other url in a same page. When user click a new item in menu bar, it will automatic to add on a new tabs.
This is my sample code.Main Page::
jQuery Tabs Sample
$(document).ready(function () {
// create jqxtabs.
$(‘#jqxtabs’).jqxTabs({showCloseButtons: true});
var tabOpened = [];
tabCounter = 2;$(‘.menuItemName’).click(function() {
id = $(this).attr(“id”);
var identifier = true;for (var t=0;t< =tabOpened.length;t++){
if (id == tabOpened[t]){
identifier = false;
}
}if(identifier){ ;
tabsId = "tabs-" + tabCounter,
$('#jqxtabs').jqxTabs('addLast', id, '‘);
tabCounter++;
$(‘#’+tabsId).load(“../” + id + “/” + “index”);}else{
alert(id + ” window already opened.”);}
});
});Tab 1
Appointments
My Calendar
TestingBoards
TestingKeysTesting Key Page::
$(document).ready(function () {
// prepare the data
var data = new Array();
var firstNames =
[
“Andrew”, “Nancy”, “Shelley”, “Regina”, “Yoshi”, “Antoni”, “Mayumi”, “Ian”, “Peter”, “Lars”, “Petra”, “Martin”, “Sven”, “Elio”, “Beate”, “Cheryl”, “Michael”, “Guylene”
];
var lastNames =
[
“Fuller”, “Davolio”, “Burke”, “Murphy”, “Nagase”, “Saavedra”, “Ohno”, “Devling”, “Wilson”, “Peterson”, “Winkler”, “Bein”, “Petersen”, “Rossi”, “Vileid”, “Saylor”, “Bjorn”, “Nodier”
];
var productNames =
[
“Black Tea”, “Green Tea”, “Caffe Espresso”, “Doubleshot Espresso”, “Caffe Latte”, “White Chocolate Mocha”, “Cramel Latte”, “Caffe Americano”, “Cappuccino”, “Espresso Truffle”, “Espresso con Panna”, “Peppermint Mocha Twist”
];
var priceValues =
[
“2.25”, “1.5”, “3.0”, “3.3”, “4.5”, “3.6”, “3.8”, “2.5”, “5.0”, “1.75”, “3.25”, “4.0”
];
for (var i = 0; i < 100; i++) {
var row = {};
var productindex = Math.floor(Math.random() * productNames.length);
var price = parseFloat(priceValues[productindex]);
var quantity = 1 + Math.round(Math.random() * 10);
row["firstname"] = firstNames[Math.floor(Math.random() * firstNames.length)];
row["lastname"] = lastNames[Math.floor(Math.random() * lastNames.length)];
row["productname"] = productNames[productindex];
row["price"] = price;
row["quantity"] = quantity;
row["total"] = price * quantity;
row["available"] = true;
data[i] = row;
}
var source =
{
localdata: data,
datatype: "array"
};
var dataAdapter = new $.jqx.dataAdapter(source, {
loadComplete: function (data) { },
loadError: function (xhr, status, error) { }
});
var columnCheckBox = null;
var updatingCheckState = false;
$("#jqxgrid").jqxGrid(
{
editable: true,
source: dataAdapter,
columns: [
{ text: '', datafield: 'available', columntype: 'checkbox', width: 30, renderer: function () {
return '‘;
},
rendered: function (element) {
$(element).jqxCheckBox({ width: 16, height: 16, animationShowDelay: 0, animationHideDelay: 0 });
columnCheckBox = $(element);
$(element).on(‘change’, function (event) {
var checked = event.args.checked;
if (checked == null || updatingCheckState) return;
var rowscount = $(“#jqxgrid”).jqxGrid(‘getdatainformation’).rowscount;
$(“#jqxgrid”).jqxGrid(‘beginupdate’);if (checked) {
$(“#jqxgrid”).jqxGrid(‘selectallrows’);
}
else if (checked == false) {
$(“#jqxgrid”).jqxGrid(‘clearselection’);
}for (var i = 0; i 0) {
$(columnCheckBox).jqxCheckBox(‘indeterminate’);
}
else {
$(columnCheckBox).jqxCheckBox(‘uncheck’);
}
updatingCheckState = false;
}
});
});Testing Boards Page::
$(document).ready(function () {
// prepare the data
var data = new Array();
var firstNames =
[
“Andrew”, “Nancy”, “Shelley”, “Regina”, “Yoshi”, “Antoni”, “Mayumi”, “Ian”, “Peter”, “Lars”, “Petra”, “Martin”, “Sven”, “Elio”, “Beate”, “Cheryl”, “Michael”, “Guylene”
];
var lastNames =
[
“Fuller”, “Davolio”, “Burke”, “Murphy”, “Nagase”, “Saavedra”, “Ohno”, “Devling”, “Wilson”, “Peterson”, “Winkler”, “Bein”, “Petersen”, “Rossi”, “Vileid”, “Saylor”, “Bjorn”, “Nodier”
];
var productNames =
[
“Black Tea”, “Green Tea”, “Caffe Espresso”, “Doubleshot Espresso”, “Caffe Latte”, “White Chocolate Mocha”, “Cramel Latte”, “Caffe Americano”, “Cappuccino”, “Espresso Truffle”, “Espresso con Panna”, “Peppermint Mocha Twist”
];
var priceValues =
[
“2.25”, “1.5”, “3.0”, “3.3”, “4.5”, “3.6”, “3.8”, “2.5”, “5.0”, “1.75”, “3.25”, “4.0”
];
for (var i = 0; i < 100; i++) {
var row = {};
var productindex = Math.floor(Math.random() * productNames.length);
var price = parseFloat(priceValues[productindex]);
var quantity = 1 + Math.round(Math.random() * 10);
row["firstname"] = firstNames[Math.floor(Math.random() * firstNames.length)];
row["lastname"] = lastNames[Math.floor(Math.random() * lastNames.length)];
row["productname"] = productNames[productindex];
row["price"] = price;
row["available"] = true;
row["quantity"] = quantity;
row["total"] = price * quantity;
data[i] = row;
}
var source =
{
localdata: data,
datatype: "array"
};
var dataAdapter = new $.jqx.dataAdapter(source, {
loadComplete: function (data) { },
loadError: function (xhr, status, error) { }
});
var columnCheckBox = null;
var updatingCheckState = false;
$("#jqxgrid123").jqxGrid(
{
editable: true,
source: dataAdapter,
columns: [
{ text: '', datafield: 'available', columntype: 'checkbox', width: 30, renderer: function () {
return '‘;
},
rendered: function (element) {
$(element).jqxCheckBox({ width: 16, height: 16, animationShowDelay: 0, animationHideDelay: 0 });
columnCheckBox = $(element);
$(element).on(‘change’, function (event) {
var checked = event.args.checked;
if (checked == null || updatingCheckState) return;
var rowscount = $(“#jqxgrid123”).jqxGrid(‘getdatainformation’).rowscount;
$(“#jqxgrid123”).jqxGrid(‘beginupdate’);if (checked) {
$(“#jqxgrid123”).jqxGrid(‘selectallrows’);
}
else if (checked == false) {
$(“#jqxgrid123”).jqxGrid(‘clearselection’);
}for (var i = 0; i 0) {
$(columnCheckBox).jqxCheckBox(‘indeterminate’);
}
else {
$(columnCheckBox).jqxCheckBox(‘uncheck’);
}
updatingCheckState = false;
}
});
});It was successful to run at 1st adding of new tabs,while when add another new tab, the error message said that the $(…).jqxTabs is not a function. So what is problem or error occur? Hope can help me. Thanks
Best Regards,
JiahuaiApril 16, 2013 at 8:30 am in reply to: Use div loading url in tabs div Use div loading url in tabs div #19341Thanks 1st.
I need used a tabs div to loading different mvc in a same page. That is similar like a iframe. Is that have a conflict between of each mvc?
-
AuthorPosts