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 @@
<%@ page import = "com.oreilly.servlet.multipart.FilePart"%>
<%@ page import = "com.oreilly.servlet.multipart.MultipartParser"%>
<%-- <%@ 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();%> --%>
<html>
<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.addHeader("Cache-Control", "post-check=0, pre-check=0");
......@@ -33,26 +35,39 @@
<%
}
%>
<%
String objName = request.getParameter("OBJ_NAME");
System.out.println("objName ["+objName+"]");
%>
<script>
function validateData()
{
<%-- var fileType = <%= session.getAttribute("fileType") %>";
var tempName = document.getElementById("existingTemplate").value;
var submitValue = document.UploadGstTemplate.submitValue[count-1].value;
document.getElementById("submitAction").value = submitValue;
String name = request.getParameter("inputFile");--%>
var files = document.getElementById('inputFile');
if(files.value.length <= 0)
{
alert("No file selected")
return false;
}
document.getElementById("processBgGlass").style.display = "block";
document.getElementById("ProgressDiv").style.display = "block";
var isSubmit = true;
if(isSubmit)
{
//document.getElementById("submitValue").disabled = true;
//document.getElementById("upload").disabled = true;
document.getElementById("UploadGstTemplate").submit();
document.UploadGstTemplate.submit();
}
}
function getFileType()
{
var inputVal=document.getElementById("inputFile").value
if(document.getElementById("two").style.display != "none")
......@@ -61,7 +76,7 @@ function getFileType()
}
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 ");
window.location.reload();
......@@ -77,51 +92,35 @@ function getFileType()
document.getElementById("fileType").value = "excel";
document.getElementById("fileFormat").innerHTML = "excel";
}
if(ext == "csv")
{
document.getElementById("fileType").value = "csv";
document.getElementById("fileFormat").innerHTML = "csv";
}
}
</script>
<%-- 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>
<form name ="UploadGstTemplate" id="UploadGstTemplate" method = "post" enctype="multipart/form-data" action ="/ibase/UploadGstExcelServlet?action=GET_DATA">
<div class="headerDiv" style="border-left: #E7E1E1 1px solid; border-right: #E7E1E1 1px solid; border-bottom: #E7E1E1 1px solid;">
<table style="width: 60%; table-layout: fixed;" align="center" border="0" >
<!-- <tr>
<td id="header" class="header" colspan= "5" align ="left" >Select File</td>
</tr> -->
<tr>
<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"/>
<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">
<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>
</div>
<div class="btnDiv">
<input type="submit" name="submitValue" id="upload" value="Upload" class="galaxyButton" onclick="return validateData()">
</div>
<input type="hidden" id ="requestType" name="submitValue" value="<%=objName%>" />
<input type ="hidden" id = "submitAction" name = "submitAction"/>
</form>
</td>
</tr>
</table>
</div>
</div>
</body>
</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