Hi ,
I was able to work this with the help of css and javascript but i am not able to edit the path which is selected in the browse input field ..
My code is as follows :
html file :
<html>
<head>
<style type="text/css">
#mybrowse { font-weight: bold; }
div.fileinputs {
position: relative;
}
div.fakefile {
position: absolute;
top: 0px;
left: 0px;
z-index: 1;
}
input.file {
position: relative;
text-align: right;
-moz-opacity:0 ;
filter:alpha(opacity: 0);
opacity: 0;
z-index: 2;
}
</style>
</head>
<script type="text/javascript">
var W3CDOM = (document.createElement && document.getElementsByTagName);
function initFileUploads() {
if (!W3CDOM) return;
var fakeFileUpload = document.createElement('div');
fakeFileUpload.className = 'fakefile';
fakeFileUpload.appendChild(document.createElement('input'));
var x = document.getElementsByTagName('input');
alert(x.length);
for (var i=0;i<x.length;i++) {
if (x[i].type != 'file') continue;
if (x[i].parentNode.className != 'fileinputs') continue;
x[i].className = 'file hidden';
var clone = fakeFileUpload.cloneNode(true);
x[i].parentNode.appendChild(clone);
x[i].relatedElement = clone.getElementsByTagName('input')[0];
x[i].onchange = x[i].onmouseout = function () {
this.relatedElement.value = this.value;
}
}
}
function modify(){
alert("Modification Success");
}
></script>
<body>
<div class="fileinputs">
<input type="file" class="file" onchange="initFileUploads()" />
<div class="fakefile" >
<input />
<input type="button" value="Browse"id="mybrowse" /> </div>
</div>
</body>
</html>
.
Please suggest ideas