View Full Version : input type=file disable

Dec 6th, 2002, 09:31 AM

I'am working on an upload script and want to disable all actions on uploading.

because the time to load the page when its uploading takes a while, people go click on every thing. Buttons i can disable but when i disable the file input. The file is not uploaded because the form doesn't send thet input because it's disabled. But when i dont disable it people can change it but it has no effect because the next page is being loaded.

Has anyone got an id how to solve this.

another question is there a way to make somekind of progress bar on howlong the upload takes. The upload is being done in ASP code.

thanks in advange

Dec 6th, 2002, 02:52 PM
Progress bar....not sure.

Click once? I think I can handle that :D
<title>click once</title>

<script type="text/javascript">
var submitted = false;
function handleClick() {
return Boolean(!submitted);


<body onclick="return handleClick();">

<form onsubmit="submitted=true;">
<input type="file" name="whatever" />
<input type="submit" value='Submit" />

</html>That should do it :D