Tim, thank you. Could I change the input type to "submit" instead of
"image"? I just want my "browse" button to look just like all my other
submit buttons . . .
Erik
Slattery, Tim - BLS wrote:
So far I have this, Erik, which works in IE but not in
Mozilla. Anyone have any other ideas on this? I did
this before but lost it in a computer crash.
<form method="get" action='boogie-woogie'>
<input type='file' name='browse' style='display: none;'>
<input type='text' name='file'>
<input type='image' onClick='browse.click();file.value=browse.value;'
src='browse.gif'>
</form>
Absolutely right, this won't work in Mozilla. IE allows this kind of
addressing, but it's non-standard. Mozilla hews to the standards always.
This will work on both browsers:
<script language="javascript>
function getFile()
{
o = document.getElementById("browse");
0.click();
document.getElementById("file").value = o.value;
}
</script>
...
<form method="get" action="boogie=woogie">
<input type="file" name="browse" id="browse" style="display:none">
<input type="text" name="file" id="file">
<input type="image" onClick="getFile()" src="browse.gif">
</form>
--
Tim Slattery
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]