jQWidgets Forums
jQuery UI Widgets › Forums › Navigation › Tabs › Tabs UI does not seem work in IE8
This topic contains 8 replies, has 4 voices, and was last updated by DollyB 12 years, 11 months ago.
-
Author
-
Hi,
I have created a jqxwindow and then added two sets of tabs and each of the tab contains some info in the jqxgrid. the tabs ui looks fine in mozilla firefox but looks odd in IE8.
Image is shown here below where no theme is applied and not well formatted.
Code is as below:
<div style="width: 100%;height: 650px;border: 0px solid #ccc;margin-top: 10px"> <div> <div> object</div> <div style="overflow: hidden"> <div> Details Attachments Reports <div> <div></div> </div> <div> attachment </div> <div> repoorts </div> </div> </div> <!-- window content --> </div> <!-- event winodw --> </div>
Could you please suggest me on this.
Thanks in advance,
SushmaHello Sushma,
here is an example of similar scenario:
HTML
<div id="window"> <div>Title</div> <div> <div id="tab1"> <ul> <li>Clients</li> <li>Orders</li> </ul> <div><div id="clientsGrid"></div></div> <div><div id="orderGrid"></div></div> </div> <div id="tab2"> <ul> <li>Shops</li> <li>Cities</li> </ul> <div><div id="shopsGrid"></div></div> <div><div id="citiesGrid"></div></div> </div> </div></div>
JavaScript
$(document).ready(function () { var theme = getTheme(); $('#window').jqxWindow({ width: 700, height: 350, theme: theme }); $('#tab1').jqxTabs({ theme: theme }); $('#tab2').jqxTabs({ theme: theme }); $("#clientsGrid").jqxGrid({ width: 670, height: 100, source: clientsDataAdapter, theme: theme, columnsresize: true, columns: clientsColumns }); $("#shopsGrid").jqxGrid({ width: 670, height: 100, source: shopsDataAdapter, theme: theme, columnsresize: true, columns: shopsColumns }); $("#orderGrid").jqxGrid({ width: 670, height: 100, source: shopsDataAdapter, theme: theme, columnsresize: true, columns: orderColumns }); $("#citiesGrid").jqxGrid({ width: 670, height: 100, source: shopsDataAdapter, theme: theme, columnsresize: true, columns: citiesColumns });});
The code above is creating window with two jqxTabs, each with two tab sections. In each tab of jqxTabs there is a jqxGrid with sample data. The variables clientsColumns, shopsColumns, orderColumns, citiesColumns and clientsDataAdapter, shopsDataAdapter, shopsDataAdapter, shopsDataAdapter depends on the specific case and data.
Important detail is that the size of jQWidgets should be set using their constructor. Here is an example with jqxWindow:
$('#window').jqxWindow({ width: 700, height: 350, theme: theme });
The code above is setting width 700px and height 350px to jqxWindow.
Best regards,
MinkojQWidgets Team
http://jqwidgets.com/Hi,
Sorry for getting back.. but i have done these settings and it works fine in mozila firefox but not in IE8. Could you please suggest if there are some changes pertaining to browser?
BR
SushmaHello,
the code I’ve suggested was tested with the last version of jQWidgets (v2.2.0), under IE7, IE8 and IE9.
Please check whether you’re using the last version and try the code again.
Best regards,
MinkojQWidgets Team
http://jqwidgets.com/Hi Minko,
Even I face this issue in IE8. I have downloaded jqwidgets-ver2.2_trial.zip file and the tabs appear vertical instead of horizontal.
I am placing my whole code here.function addEventListeners() {
$(‘#showWindowButton’).mousedown(function () {
$(‘#eventWindow’).jqxWindow(‘show’);
});$(“#jqxgridreq”).bind(‘cellbeginedit’, function (event) {
var args = event.args;
$(“#cellbegineditevent”).html(“Event Type: cellbeginedit, Column: ” + args.datafield + “, Row: ” + (1 + args.rowindex) + “, Value: ” + args.value);
});
$(“#jqxgridreq”).bind(‘cellendedit’, function (event) {
var args = event.args;
$(“#cellendeditevent”).html(“Event Type: cellendedit, Column: ” + args.datafield + “, Row: ” + (1 + args.rowindex) + “, Value: ” + args.value);
});
}
function createElements(theme) {
$(‘#eventWindow’).jqxWindow({ maxHeight: 1250, maxWidth:1000, minHeight: 200, minWidth: 200, height: 725, width: 750,
theme: theme, resizable: false, isModal: true, modalOpacity: 0.3, showCollapseButton: true
});$(‘#tab1’).jqxTabs({ height: 300, theme: theme });
$(‘#tab2’).jqxTabs({ height: 650, theme: theme });//prepare grid
// prepare the data
var reqData = generatedata(200);
var reqSource =
{
localdata: reqData,
datatype: “array”,
updaterow: function (rowid, rowdata) {
// synchronize with the server – send update command
}
};
var reqDataAdapter = new $.jqx.dataAdapter(reqSource);
// initialize jqxGrid
$(“#jqxgridreq”).jqxGrid(
{
width: 700,
source: reqDataAdapter,
editable: true,
pageable: true,
autoheight: true,
theme: theme,
selectionmode: ‘singlecell’,
columns: [
{ text: ‘First Name’, columntype: ‘textbox’, datafield: ‘firstname’, width: 90 },
{ text: ‘Last Name’, datafield: ‘lastname’, columntype: ‘textbox’, width: 90 },
{ text: ‘Product’, columntype: ‘dropdownlist’, datafield: ‘productname’, width: 177},
{ text: ‘Available’, datafield: ‘available’, columntype: ‘checkbox’, width: 67 },
{ text: ‘Ship Date’, datafield: ‘date’, columntype: ‘datetimeinput’, width: 95, cellsalign: ‘right’, cellsformat: ‘d’,
validation: function (cell, value) {
var year = value.getFullYear();
if (year >= 2013) {
return { result: false, message: “Ship Date should be before 1/1/2013” };
}
return true;
}
},
{ text: ‘Quantity’, datafield: ‘quantity’, width: 75, cellsalign: ‘right’, columntype: ‘numberinput’,
validation: function (cell, value) {
if (value 150) {
return { result: false, message: “Quantity should be in the 0-150 interval” };
}
return true;
},
initeditor: function (row, cellvalue, editor) {
editor.jqxNumberInput({ decimalDigits: 0, digits: 3 });
}
},
{ text: ‘Price’, datafield: ‘price’, width: 70, cellsalign: ‘right’, cellsformat: ‘c2’, columntype: ‘numberinput’,
validation: function (cell, value) {
if (value 15) {
return { result: false, message: “Price should be in the 0-15 interval” };
}
return true;
},
initeditor: function (row, cellvalue, editor) {
editor.jqxNumberInput({ digits: 3 });
}
}
]
});var url = “/eMatrix/jsp/mars/jquery/data/wpReqs.xml”;
// prepare the data
var source =
{
datatype: “xml”,
datafields: [
{ name: ‘Name’, map: ‘name’ },
{ name: ‘Revision’, map: ‘revision’ },
{ name: ‘Description’, map: ‘description’ },
{ name: ‘Owner’, map: ‘owner’ },
{ name: ‘Category’, map: ‘category’ },
{ name: ‘Priority’, map: ‘priority’ }
],
root: “objects”,
record: “object”,
id: ‘id’,
url: url
};// Create jqxGrid
$(“#jqxgrid”).jqxGrid(
{
width: 670,
source: source,
theme: theme,
columnsresize: true,
autoheight: true,
columns: [
{ text: ‘Name’, datafield: ‘Name’, width: 150, pinned: true },
{ text: ‘Revision’, datafield: ‘Revision’, width: 50 },
{ text: ‘Description’, datafield: ‘Description’, width: 250 },
{ text: ‘Owner’, datafield: ‘Owner’, width: 120 },
{ text: ‘Category’, datafield: ‘Category’, width: 100 },
{ text: ‘Priority’, datafield: ‘Priority’, width: 100 }
]
});//Added for Attachments Tab
// prepare the data
var attachData = generateattachdata(4);
var attachSource =
{
localdata: attachData,
datatype: “array”,
updaterow: function (rowid, rowdata) {
// synchronize with the server – send update command
}
};
var attachDataAdapter = new $.jqx.dataAdapter(attachSource);// Create jqxGrid
$(“#jqxgrid2″).jqxGrid(
{
width: 700,
source: attachDataAdapter,
editable: false,
pageable: true,
autoheight: true,
columnsresize: true,
theme: theme,
columns: [
{ text: ”, columntype: ‘checkbox’, datafield: ‘CButton’, width: 67 },
{ text: ”, datafield: ‘image’, width: 40 },
{ text: ‘File Name’, datafield: ‘FileName’, width: 300 },
{ text: ‘Format’, datafield: ‘Format’, width: 150 },
{ text: ‘Checked Out’, datafield: ‘CheckedOut’, width: 150 }
]
});
}$(document).ready(function () {
var theme = $.data(document.body, ‘theme’, theme);
if (theme == undefined) theme = ”;
addEventListeners();
createElements(theme);
$(“#jqxWidget”).css(‘visibility’, ‘visible’);
});TitleDetails
Attachments
Reports
The project was in development for approximately three years at Paramount Pictures,
during which time a screen adaptation that differed significantly from the novel
was written.Connected Items:
Requirements
Please provide the solution for this issue.
Hi DollyB,
Do you set the “
<!DOCTYPE html>
“. If you don’t set it, the widget will not be rendered correctly.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter,
Yes. the DOCTYPE has been set.
Hi DollyB,
Please try this code from our sample which I tested with IE8 and it works on my side. I would also ask you to send us your sample’s code to support@jqwidgets.com as it does not seem to be formatted.
<!DOCTYPE html><html lang="en"><head> <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" /> <script type="text/javascript" src="../../scripts/gettheme.js"></script> <script type="text/javascript" src="../../scripts/jquery-1.7.2.min.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxtabs.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxcheckbox.js"></script> <script type="text/javascript"> $(document).ready(function () { var theme = getTheme(); // Create jqxTabs. $('#jqxTabs').jqxTabs({ width: '90%', height: 200, position: 'top', theme: theme }); $('#settings div').css('margin-top', '10px'); $('#animation').jqxCheckBox({ theme: theme }); $('#contentAnimation').jqxCheckBox({ theme: theme }); $('#animation').bind('change', function (event) { var checked = event.args.checked; $('#jqxTabs').jqxTabs({ selectionTracker: checked }); }); $('#contentAnimation').bind('change', function (event) { var checked = event.args.checked; if (checked) { $('#jqxTabs').jqxTabs({ animationType: 'fade' }); } else { $('#jqxTabs').jqxTabs({ animationType: 'none' }); } }); }); </script></head><body class='default'> <div id='jqxWidget'> <div id='jqxTabs'> <ul> <li style="margin-left: 30px;">Node.js</li> <li>JavaServer Pages</li> <li>Active Server Pages</li> <li>Python</li> <li>Perl</li> </ul> <div> Node.js is an event-driven I/O server-side JavaScript environment based on V8. It is intended for writing scalable network programs such as web servers. It was created by Ryan Dahl in 2009, and its growth is sponsored by Joyent, which employs Dahl. Similar environments written in other programming languages include Twisted for Python, Perl Object Environment for Perl, libevent for C and EventMachine for Ruby. Unlike most JavaScript, it is not executed in a web browser, but is instead a form of server-side JavaScript. Node.js implements some CommonJS specifications. Node.js includes a REPL environment for interactive testing. </div> <div> JavaServer Pages (JSP) is a Java technology that helps software developers serve dynamically generated web pages based on HTML, XML, or other document types. Released in 1999 as Sun's answer to ASP and PHP,[citation needed] JSP was designed to address the perception that the Java programming environment didn't provide developers with enough support for the Web. To deploy and run, a compatible web server with servlet container is required. The Java Servlet and the JavaServer Pages (JSP) specifications from Sun Microsystems and the JCP (Java Community Process) must both be met by the container. </div> <div> ASP.NET is a web application framework developed and marketed by Microsoft to allow programmers to build dynamic web sites, web applications and web services. It was first released in January 2002 with version 1.0 of the .NET Framework, and is the successor to Microsoft's Active Server Pages (ASP) technology. ASP.NET is built on the Common Language Runtime (CLR), allowing programmers to write ASP.NET code using any supported .NET language. The ASP.NET SOAP extension framework allows ASP.NET components to process SOAP messages. </div> <div> Python is a general-purpose, high-level programming language[5] whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax",[7] and its standard library is large and comprehensive. Its use of indentation for block delimiters is unique among popular programming languages. Python supports multiple programming paradigms, primarily but not limited to object-oriented, imperative and, to a lesser extent, functional programming styles. It features a fully dynamic type system and automatic memory management, similar to that of Scheme, Ruby, Perl, and Tcl. Like other dynamic languages, Python is often used as a scripting language, but is also used in a wide range of non-scripting contexts. </div> <div> Perl is a high-level, general-purpose, interpreted, dynamic programming language. Perl was originally developed by Larry Wall in 1987 as a general-purpose Unix scripting language to make report processing easier. Since then, it has undergone many changes and revisions and become widely popular amongst programmers. Larry Wall continues to oversee development of the core language, and its upcoming version, Perl 6. Perl borrows features from other programming languages including C, shell scripting (sh), AWK, and sed.[5] The language provides powerful text processing facilities without the arbitrary data length limits of many contemporary Unix tools, facilitating easy manipulation of text files. </div> </div> <div id='settings'> <div id='animation'> Enable Select Animation</div> <div id='contentAnimation'> Enable Content Animation</div> </div> </div></body></html>
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter,
The issue is resolved now.
I have jsp2 which contains the code pasted by me in my previous post. And I am including jsp2 in jsp1. And I placed DOCTYPE in the included jsp (jsp2) instead of including jsp(jsp1).
Now I corrected my code and the Tabs are looking fine now.Thankx for your valuable input.
Regards
DollyB -
AuthorPosts
You must be logged in to reply to this topic.