Badman3k
04-18-2004, 11:08 PM
My parent window opens another window called upload.htm which contains the following code:
<script>
function uploader(){
string=document.upload.FILE1.value
display=string.substring(string.length,string.lastIndexOf("\\")+1 )
window.parent.AddTxt('<img src=\"images/misc/' + display + '">');
}
</script>
<center>
Browse for the image you want to upload...
<form action="upload_room101.cgi"
method="post" enctype="multipart/form-data" name="upload"
onsubmit="uploader()">
<input type="file" name="FILE1" id="FILE1">
<br>
<input type="submit" name="Submit" value="Submit">
</form>
I need the javascript to pass the value of display to the parent window, which has 4 frames, one of which is called bottomFrame. This displays the file footer.html, in which there is a javascript called AddTxt() and it is this function that i need to get the value of display to.
Does anyone have anyideas, cause i'm at a total loss! :(
Many thanks in advance,
<script>
function uploader(){
string=document.upload.FILE1.value
display=string.substring(string.length,string.lastIndexOf("\\")+1 )
window.parent.AddTxt('<img src=\"images/misc/' + display + '">');
}
</script>
<center>
Browse for the image you want to upload...
<form action="upload_room101.cgi"
method="post" enctype="multipart/form-data" name="upload"
onsubmit="uploader()">
<input type="file" name="FILE1" id="FILE1">
<br>
<input type="submit" name="Submit" value="Submit">
</form>
I need the javascript to pass the value of display to the parent window, which has 4 frames, one of which is called bottomFrame. This displays the file footer.html, in which there is a javascript called AddTxt() and it is this function that i need to get the value of display to.
Does anyone have anyideas, cause i'm at a total loss! :(
Many thanks in advance,