Monthly Archives:October 2010

Listsearch extender and onchange event

27 Oct 10
admin
No Comments

When we use list searchextender and onchange event js function in a dropdownlist the js function will fire twice.

Solution:

Add follwing code to the page load

UserDropDown.Attributes.Add(“onpropertychange”, @”if ( event.propertyName == ‘selectedIndex’ ) jsfunction();”);

JQuery Date formating

08 Oct 10
admin
No Comments
We can format date using JQuery.

syntax:

$.format.date(“2010-01-12 10:54:50.546”, “dd/MM/yyyy”);

Date difference in Oracle

07 Oct 10
admin
No Comments
Different date difference function in Oracle:

Date difference in months

select round((MONTHS_BETWEEN(TO_DATE(sysdate), TO_DATE(‘2010-01-01’, ‘YYYY-MM-DD’)))) as mon from dual;

Result: 9

Date difference in days

select to_date(‘7-MAR-2010′) – to_date(’07-FEB-2010’)
from dual

result: 28

Select radiobuttonlist using jquery

06 Oct 10
admin
one comments
You can select a radiobuttion list by value using jquery

$(‘#radiobuttonlistId’).find(“input[value=’0′]”).attr(“checked”, “checked”);

Regards.