You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ch...@apache.org on 2006/10/13 07:55:20 UTC

svn commit: r463566 - /webservices/axis2/trunk/java/modules/webapp/upload.jsp

Author: chamil
Date: Thu Oct 12 22:55:19 2006
New Revision: 463566

URL: http://svn.apache.org/viewvc?view=rev&rev=463566
Log:
Fixing the upload jsp as per AXIS2-1288. Now if there is no file selected there will be message.

Modified:
    webservices/axis2/trunk/java/modules/webapp/upload.jsp

Modified: webservices/axis2/trunk/java/modules/webapp/upload.jsp
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/webapp/upload.jsp?view=diff&rev=463566&r1=463565&r2=463566
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/upload.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/upload.jsp Thu Oct 12 22:55:19 2006
@@ -17,7 +17,19 @@
   */
 %>
 
-<jsp:include page="include/adminheader.jsp"/>
+<jsp:include page="include/adminheader.jsp"/>
+<script type="text/javascript">
+<!--
+	function checkFileUpload(){
+		if (document.getElementById('serviceUpload').value == '') {
+			alert('Please select a file before clicking the upload button.');
+			return false;
+		} else {
+			document.Axis2upload.submit();
+		}
+	}
+//-->
+</script>
 <h2>Upload a AxisService Archive File</h2>
 
 <p>You can upload a packaged Axis 2 AxisService from this page in two small steps.</p>
@@ -35,16 +47,16 @@
 <font color="red">The following error occurred <br/> <%= request.getAttribute("cause") %></font><br/>
 <% } %>
 
-<form method="post" name="Axis2upload" action="axis2-admin/upload"
+<form method="post" name="Axis2upload" id="Axis2upload" action="axis2-admin/upload"
       enctype="multipart/form-data">
   <table>
     <tr>
       <td>Service archive : </td>
-      <td><input type="file" name="filename" size="50"/></td>
+      <td><input id="serviceUpload" type="file" name="filename" size="50"/></td>
     </tr>
     <tr>
       <td>&nbsp;</td>
-      <td><input name="upload" type="submit" value=" Upload "/></td>
+      <td><input name="upload" type="button" onclick="javascript:checkFileUpload();" value=" Upload "/></td>
     </tr>
   </table>
 </form>



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org