Here are my code:
<tr>
<td><input name="clubId" type="text" class="input1" style="width:200px;" >
<a href="javascript:isExistClubId();"><img src="/club/images/main/C_btn_check.gif" border="0" align="absmiddle" alt=""></a>
</td>
</tr>
function isExistClubId() {
if(strLen(document.makeClub.clubId.value) > 20) {
alert("Silahkan masukkan nama Klub hingga 40 karakter");
document.makeClub.clubId.focus();
} else if (!IsAlphaNumeric(document.makeClub.clubId.value)) {
alert("Silahkan masukkan nama Klub dengan angka dan huruf.");
document.makeClub.clubId.value = "";
document.makeClub.clubId.focus();
} else {
var w = document.body.clientWidth, h = document.body.clientHeight;
var popW = 350, popH = 200;
var leftPos = (w - popW) / 2, topPos = (h - popH) / 2;
window.open('/club/club/isExistClubId.vw?clubId='+document.makeClub.clubId.value,'subdomain','width=' + popW + ',height=' + popH + ',top=' + topPos + ', left=' + leftPos);
}
}
My problem is how to centered popup windows with this javascript? Help me, please.