Hi,
I am new to Javascript and to this forum. I thought maybe someone could give some help. I have a very simple forum that uploads a file, and while the file is being uploaded, I want to display some text and display an animated gif (a type of progress indicator image).
I created a function that seems to do the trick, yet when I put the function call within the upload forum, it only changes the text, but not the image. If anyone can take a look at my code that would be great.
[CODE]
<html>
<head> <title> </title>
<script type=”text/javascript”>
function uploadChange(){
document.getElementById(‘uploadText’).innerHTML = ‘Uploading File’;
document.getElementById(‘loading’).src = ‘loadingAnimate.gif’;
}
</script>
</head>
<body>
<form enctype=’multipart/form-data’ action=’UploadAccept’ method=’POST’>
<input type=’hidden’ name=’MAX_FILE_SIZE’ value=’500000′ />
Choose a file to upload <input name=’uploadedfile’ type=’file’ />
<input type=’submit’ value=’Upload File’ onclick=”uploadChange()” />
</form>
</body>
<img src=”loadingSpace.gif” name=”loading” id=”loading” width=”48″ height=”48″ border=”1″>
<b id=’uploadText’> </b>
<input type=’button’ onclick=’uploadChange()’ value=’Change Text’/>
</html>