Posts

Showing posts from August, 2010

HTML table to Excel table using Javascript

Image
Convert HTML tabular date to Excel form using Javascript Let try to generate html data to xml data by using code below: < html > < head > < script type="text/javascript" > function CreateExcelSheet() { var x=myTable.rows var xls = new ActiveXObject("Excel.Application") xls.visible = true xls.Workbooks.Add for (i = 0; i <  x.length; i++) { var y = x[i].cells for (j = 0; j <  y.length; j++) { xls.Cells( i+1, j+1).Value = y[j].innerText } } } < /script > < /head > < body marginheight="0" marginwidth="0" > < form > < input type="button" onclick="CreateExcelSheet()" value="Create Excel Sheet" > < /form > < table id="myTable" border="1" > < tr > < b >< td >Name < /td > < td >Age< /td >< /b >< /tr > < tr > < td >Shivani < /td > <

CSS HACKS

We have lots of ways to HACK CSS. However, these are the couple I find most useful. Star-property Hack *property: value; Not sure on the name but I call this the star-property hack. This hack allows you to target IE7 and below. Underscore-property Hack _property: value; This targets IE6 and below. Any styles will be applied to ie 6 and below. !important Targetting The !important at the end of a style, tells browsers that this property should override any other declarations of that property regardless of position. For example in this case: width: 10px !important; width: 80px; Even though the 80px declaration comes second, Firefox 3 and IE7/8 will render this style as 10pixels. IE6 does not recognize the !important declaration and will apply an 80pixel width. I prefer this method when I need to target IE7 and FF with one rule, and IE6 with the other. This is a valid method of feeding one rule to ie7/ff and another for ie6. CSS Examples div.test{ margin-top: 10px;

CSS Conditional Statements or Comments

Conditional comments Implemented by IE to fix their retarded browsers, conditional comments can help you target different versions of IE. < ! --[if IE 6] > Any instructions in this comment will be parsed by IE 6. < ! [endif] - - > < ! - - [if IE 7] > Any instructions in this comment will be parsed by IE 7. <!--[if lte IE 7]> Any instructions in browsers less than or equal to IE7 will parse these comments. < ! [endif] - - > Example of using conditional comments: < ! - - [if IE 7] > < link href="styles/ie7styles.css" rel="stylesheet" type="text/css" / > < ! [endif] - - > reference link : http://theinfiniteloopblog.com/tag/cross-browser-css/