UploadPicture problem

hi "JAVA PANDITS"

iam having problem in application i can,t able to upload picture

<html>

<HEAD>

<META http-equiv="expires" content="0">

<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<TITLE>upload_own_picture</TITLE>

<LINK href='<%= URIService.cURL("general/style.css", request, response)%>' rel="stylesheet" type="text/css">

<script type="text/javascript" language="JavaScript">

<!--

function upload_picture() {

document.pictureuploadform.action='<%= URIService.cPath("OwnIDCardUploadPictureController", request, response)%>';

}

function finish_upload_picture() {

top.ownidcardframeset_form.submit();

}

//-->

</script>

</HEAD>

<body>

<form name="pictureuploadform"action= method="post" enctype="multipart/form-data">

<%

String message = output.getMessage();

System.out.println("&&&&&"+message);

if (message =null)

{

if(message.equals(IDCardControllerConstantsInterface.SUCCESSFULUPLOAD))

{

%>

<script type="text/javascript" language="JavaScript">

<!--

alert('<%= message %>'+ "");

finish_upload_picture();

//-->

</script>

<%

}

else

{

%>

<script type="text/javascript" language="JavaScript">

<!--

alert("Could not Upload the Real picture");

//-->

</script>

<%

}

}

%>

<table cellspacing="10" cellpadding="10" align="left"><tr><td colspan="2"><u>Step 1:</u>

<input name="fileupload" type="file" value="fileuploadvalue" size="20" maxlength="10000"class="cy2button" style="width:275px"></td></tr>

<tr><td><u>Step 2:</u>

Upload Pic to server.</td>

<td align="right"><input name="UPLOADSERVLET" type="submit" value="Upload" class="cy2button" style="width:75px" onclick='javascript:upload_picture();'></td></tr>

<tr><td><u>Step 3:</u>

Picture Size: xx kb</td>

<td align="right"><input type="Button" name= "finishuploadpicture" value="Finish" onclick='javascript:finish_upload_picture();' class="cy2button" style="width:75px"></td></tr>

</table>

</form>

</body>

</html>

[3074 byte] By [pricef] at [2007-9-26 1:42:41]
# 1

Hi pricef,

I had gone through the code,when ever you are doing uploading the picture you have to call submit method after upload action.

document.pictureuploadform.submit();

I hope this will help you out.

Regards,

TirumalaRao

Developer TechnicalSupport,

SunmicroSystem,India.

rao_indts at 2007-6-29 2:35:52 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...