%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <% String id = request.getParameter("id"); MemberDAO dao = new MemberDAO(); boolean exist = dao.isExistId(id); %>
<%@page import="member.dao.MemberDAO"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%
String id = request.getParameter("id");
MemberDAO dao = new MemberDAO();
boolean exist = dao.isExistId(id);
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>checkid.jsp</title>
</head>
<body>
<h2>ID 중복 확인</h2>
<!-- 새로 쓸 아이디 재정의 -->
<form action="checkid.jsp" method="post">
<%if(exist) {%>
<p><%=id %>는 사용중인 아이디입니다...</p>
<br>
<label>아이디 : </label><input type="text" name="id"/> <input type="submit" value="중복체크"/>
<%} else { %>
<p><%=id %>는 사용 가능합니다...</p>
<br>
<input type="button" value="사용" onclick="checkIdClose()"/>
<%} %>
</form>
<script type="text/javascript">
function checkIdClose(){
opener.writeForm.id.value="<%=id %>";
window.close();
opener.writeForm.pwd.focus();
}
</script>
</body>
</html>