2009년 8월 28일 금요일

[jquery] radio button

$("input[name='radio_name']:checked").val();

2009년 8월 25일 화요일

response.setCharacterEncoding("utf-8")

replace response.setCharacterEncoding("utf-8") with
response.setContentType("text/xml;charset=utf-8");

2009년 8월 18일 화요일

스윙



함 보시고 평가해주세요

2009년 7월 29일 수요일

jQuery - exist element?

Jquery returns its length even though it hasn't created yet.
$("#id").length = 0 means there's no element for '#id'

if($("#id").length > 0 ) {
// to do something...
}

how to exit from each loop - jQuery

"If you wish to break the each() loop at a particular iteration you can do so by making your function return false. Returning non-false is the same as a continue statement in a for loop, it will skip "

$("#element-name").each(function(i){
if(this.val() == ''){
alert("null");
return false;
}
});

if jQuery is surrounded by another function, how can you do it?
i.e

function test() {
$("#element-name").each(function(i){
if(this.val() == ''){
alert("null");
return false;
}
});


// do something more

}

probably you can't avoid below logic.
Any idea to exit at once from whole function?

2009년 7월 28일 화요일

Add this to context.xml

Resource name="poolname" auth="Container"
type="oracle.jdbc.pool.OracleDataSource"
factory="oracle.jdbc.pool.OracleDataSourceFactory"
connectionCachingEnabled="true"
user="DB" password="DB"
driverClassName="oracle.jdbc.OracleDriver"
url="jdbc:oracle:thin:@192.168.100.1:1521:ORCL"
removeAbandoned="true"
removeAbandonedTimeout="30"
maxActive="20"
maxIdle="10" maxwait="-1"

getting Eclipse console encoding

If you got any problem on console message.
Add this to xxx.ini file.

I hope this will help you.

-Dfile.encoding=UTF-8