Commit 68e184cd authored by chavanp's avatar chavanp

change alignment remove select text drop down.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@106646 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 06d37555
...@@ -10,11 +10,13 @@ ...@@ -10,11 +10,13 @@
<%@ page import = "com.oreilly.servlet.multipart.FilePart"%> <%@ page import = "com.oreilly.servlet.multipart.FilePart"%>
<%@ page import = "com.oreilly.servlet.multipart.MultipartParser"%> <%@ page import = "com.oreilly.servlet.multipart.MultipartParser"%>
<%-- <%@ page import="ibase.webitm.ejb.wsfa.masters.test.GSTUploadExcelTemplate"%> --%> <%-- <%@ page import="ibase.webitm.ejb.wsfa.masters.test.GSTUploadExcelTemplate"%> --%>
<%@page import = "java.lang.*,java.util.*, ibase.webitm.ejb.gst.GSTUploadExcelTemplate"%> <%-- <%@page import = "java.lang.*,java.util.*, ibase.webitm.ejb.gst.GSTUploadExcelTemplate"%>
--%><%-- <%@page import = "java.lang.*,java.util.*, ibase.webitm.ejb.gst.GSTPurcUploadExcelTemplate"%>
--%>
<%-- <%GSTUploadExcelTemplate Ec = new GSTUploadExcelTemplate();%> --%> <%-- <%GSTUploadExcelTemplate Ec = new GSTUploadExcelTemplate();%> --%>
<html> <html>
<head> <head>
<link rel="stylesheet" type="text/css" href="/ibase/webitm/css/theme/galaxy-theme.css" media="screen"/>
<% <%
response.setHeader("Cache-Control", "no-store, no-cache,must-revalidate"); response.setHeader("Cache-Control", "no-store, no-cache,must-revalidate");
response.addHeader("Cache-Control", "post-check=0, pre-check=0"); response.addHeader("Cache-Control", "post-check=0, pre-check=0");
...@@ -33,26 +35,39 @@ ...@@ -33,26 +35,39 @@
<% <%
} }
%> %>
<%
String objName = request.getParameter("OBJ_NAME");
System.out.println("objName ["+objName+"]");
%>
<script> <script>
function validateData() function validateData()
{ {
<%-- var fileType = <%= session.getAttribute("fileType") %>";
var tempName = document.getElementById("existingTemplate").value; var files = document.getElementById('inputFile');
var submitValue = document.UploadGstTemplate.submitValue[count-1].value;
document.getElementById("submitAction").value = submitValue; if(files.value.length <= 0)
String name = request.getParameter("inputFile");--%> {
alert("No file selected")
return false;
}
document.getElementById("processBgGlass").style.display = "block";
document.getElementById("ProgressDiv").style.display = "block";
var isSubmit = true; var isSubmit = true;
if(isSubmit) if(isSubmit)
{ {
//document.getElementById("submitValue").disabled = true;
//document.getElementById("upload").disabled = true;
document.getElementById("UploadGstTemplate").submit(); document.getElementById("UploadGstTemplate").submit();
document.UploadGstTemplate.submit(); document.UploadGstTemplate.submit();
} }
} }
function getFileType() function getFileType()
{ {
var inputVal=document.getElementById("inputFile").value var inputVal=document.getElementById("inputFile").value
if(document.getElementById("two").style.display != "none") if(document.getElementById("two").style.display != "none")
...@@ -61,7 +76,7 @@ function getFileType() ...@@ -61,7 +76,7 @@ function getFileType()
} }
var ext = inputVal.substring(inputVal.lastIndexOf('.') + 1); var ext = inputVal.substring(inputVal.lastIndexOf('.') + 1);
if(!(ext == "xls" || ext == "csv" || ext =="xlsx") ) if(!(ext == "xls" || ext =="xlsx") )
{ {
alert("Please select file with .xls and .xlsx extension only "); alert("Please select file with .xls and .xlsx extension only ");
window.location.reload(); window.location.reload();
...@@ -77,51 +92,35 @@ function getFileType() ...@@ -77,51 +92,35 @@ function getFileType()
document.getElementById("fileType").value = "excel"; document.getElementById("fileType").value = "excel";
document.getElementById("fileFormat").innerHTML = "excel"; document.getElementById("fileFormat").innerHTML = "excel";
} }
if(ext == "csv")
{
document.getElementById("fileType").value = "csv";
document.getElementById("fileFormat").innerHTML = "csv";
}
} }
</script> </script>
<%-- Validation on Browse Button --%> <%-- Validation on Browse Button --%>
<link rel="stylesheet" type="text/css" href="/ibase/webitm/css/Galaxy/galaxy-theme.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="/ibase/webitm/css/Standard/default.css" media="screen"/>
<link rel="stylesheet" href="/ibase/webitm/css/UploadGstTemplate.css" >
<body> <body>
<div id="processBgGlass" class="bgGlass" style="position: absolute; left: 0px; top: 0px; visibility: visible; display: none; width: 100%; height: 100%;"></div>
<div id="ProgressDiv" style = "display:none;" class="ProgressDiv"></div>
<div class="agile-its">
<h2> Excel File Upload</h2>
<div class="w3layouts">
<div class="photos-upload-view">
<form name ="UploadGstTemplate" id="UploadGstTemplate" method = "post" enctype="multipart/form-data" action ="/ibase/UploadGstExcelServlet?action=GET_DATA"> <form name ="UploadGstTemplate" id="UploadGstTemplate" method = "post" enctype="multipart/form-data" action ="/ibase/UploadGstExcelServlet?action=GET_DATA">
<div class="inputFileDiv">
<div class="eachDiv"><input type="file" name= "inputFile" id="inputFile" onChange = "getFileType()" style="font-size: 13px; width: 81.8%" ></input></div>
<div class="headerDiv" style="border-left: #E7E1E1 1px solid; border-right: #E7E1E1 1px solid; border-bottom: #E7E1E1 1px solid;"> </div>
<table style="width: 60%; table-layout: fixed;" align="center" border="0" > </div>
<!-- <tr> <div class="btnDiv">
<td id="header" class="header" colspan= "5" align ="left" >Select File</td> <input type="submit" name="submitValue" id="upload" value="Upload" class="galaxyButton" onclick="return validateData()">
</tr> --> </div>
<tr> <input type="hidden" id ="requestType" name="submitValue" value="<%=objName%>" />
<td class = "detail1" align="right" style="font-size:14px">File : &nbsp;</td>
<td colspan="3" class = "detail2">
<b id="one" style="margin-left: -1px;">
<input type="file" name= "inputFile" id="inputFile" onChange = "getFileType()" style="font-size: 13px; width: 81.8%" ></input>
</b>
<b id="two" style="display:none; margin-left: -1px;">
<input type="text" name= "fileText" id="fileText" size="32" onblur = "getFileType()" style="width: 81.8%" /></td>
</b>
</tr>
<tr>
<td>
<b id="one" style="margin-left: -1px;">
<%-- This list is hidden on page as File Type would be determined logically with file's Extenstion --%>
<select name = "fileType" id="fileType" width ="85%" class="dropdownlist">
<option value = "" >Select a file</option>
<option value = "csv">CSV</option>
<option value = "excel">EXCEL</option>
<option value = "xml" >XML</option>
</select>
</b>
<!-- <input type="button" value="Upload" class="button" /></td> -->
<input type ="submit" name = "submitValue" id ="upload" value= "Upload" class="button" onClick = "validateData()"/>
<input type ="hidden" id = "submitAction" name = "submitAction"/> <input type ="hidden" id = "submitAction" name = "submitAction"/>
</form> </form>
</td> </div>
</tr>
</table>
</div> </div>
</body> </body>
</html> </html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment