Tuesday, July 23, 2013

Find previous td in JQuery

<pre class="brush: js">// Comment
<table>
<tr><td><asp:Label ID="lblAmt" runat="server"  CssClass="jqHDHP">5.00</asp:Label ID><td> </td><td><asp:Label ID="lblTotal" runat="server"  CssClass="jqNet">5.00</asp:Label ID></td></td></tr></table> 

// In this Jquery snippet we will loop over  total label (jqNet) & find the value of Amount label which is previous to previous td of total label
//var sNet = $(this).html(); 
 alert(total); });
 alert(total);
 });
 $('.jqNet').each(function () {
 var total = parseFloat($(this).closest('td').prev().closest('td').prev().find('.jqHDHP').html()); 
}
</pre> 

Monday, July 1, 2013

Windows: Fix C:\Progra~1\Google\GOOGLE~2\GOEC62~1.DLL Bad image error message on windows application startup

Download the Autoruns utility  http://live.sysinternals.com/autoruns.exe and Run the apllication (as prompted).
Go to the "AppInit" tab  then search for a file with something like "\GOEC62~1.DLL. Or Browse~1.dll
Right click on this file, and Delete.

Restart the system & error has been fixed

Wednesday, June 12, 2013

Fix GridView OR DatGrid Column value to 2 decimal (20.00) position in JQuery

<script>
   $(function() {
   $('.jqFix2').each(function () {
$(this).html(($(this).text() * 1.0).toFixed(2));
});
</script>

DataGrid 
<asp:DataGrid ID="dgCopay" runat="server
AllowSorting="True" ShowHeader="True" BackColor="White" CellPadding="3" AutoGenerateColumns="False">
<Columns>
 HeaderText="Total" HeaderStyle-CssClass="HeaderStyle" HeaderStyle-ForeColor="White"
HeaderStyle-HorizontalAlign="center" ItemStyle-CssClass="ItemStyle" ItemStyle-HorizontalAlign="right">
<ItemTemplate>
<asp:Label ID="Label19" runat="server" style="Width:50px" CssClass="jqFix2">
<%# DataBinder.Eval(Container.DataItem,"total") %></asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:DataGrid >

Monday, June 10, 2013

Search whole page & replace text in JQuery

      $('*:contains("00%")').each(function(){
      if($(this).children().length < 1) { // alert('hi');                    $(this).html($(this).text().replace("00%",'0%')) } });

Saturday, February 9, 2013

Repair Windows Server 2008 R2 & Restart issue

Repair WINDOWS Server 2008 R2

Suppose your windows Server R2 is not starting up & restarting at start up then you can fix it .

Procedure to Repair Corrupt Windows 2008 Server OS:

1)  Insert bootable CD / DVD of Windows 2008 Server in the machine.
2) Restart PC
3)  Instialize the New Windows setup.
4) Click on Repair Windows
5)Execute this command in recovery console
X:\Sources\Recovery\StartRep.exe

It will ake some time & fix all errors.