<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
<script type="text/javascript">
function doubleAction() {
var time = new Date().getTime();
document.boardUploadForm.action = "../ImageUpload/uploadProcess.jsp?time="
+ time;
document.boardUploadForm.submit();
document.boardWriteForm.action = "boardProcess.jsp?time=" + time;
document.boardWriteForm.submit();
}
</script>
</head>
<body>
<form name="boardWriteForm" method="post">
<input type="hidden" name="mode" value="W" />
<table border="1" summary="BoardWrite">
<caption>BoardWrite</caption>
<colgroup>
<col width="100" />
<col width="500" />
</colgroup>
<tbody>
<tr>
<th align="center">Subject</th>
<td><input type="text" name="subject" size="80"
maxlength="100" /></td>
</tr>
<tr>
<td colspan="2"><textarea name="contents" cols="80" rows="10"></textarea>
<script>
CKEDITOR.replace('contents');
</script></td>
</tr>
</tbody>
</table>
</form>
<form name="boardUploadForm" method="post"
enctype="multipart/form-data">
<table border="1" summary="upload">
<caption>upload</caption>
<colgroup>
<col width="100" />
<col width="500" />
</colgroup>
<tbody>
<tr>
<th align="center">upload</th>
<td><input type="file" multiple="multiple" id="filename"
name="filename" /></td>
</tr>
</tbody>
</table>
<p>
<input type="submit" value="write" onclick="doubleAction();" />
</p>
</form>
</body>
this source is a wegpage contain board write and upload file
first form boardWirteForm is for write content
second form boardUploadForm is for upload file
and submit button is trigger function doubleAction()
but just one submit is work other submit is not work
any suggestion?