Highlights
All Snippets
Top 100 Snippets
Librarians
gbCodeLib

By Language
VB6
JavaScript
Perl
HTML
SQL
Java
DOS

GBIC >> Source Code >> JavaScript >> Snippet

Open file


< html >
< head >
< script >
<!-- Original :  Hoop Hooper (hooper119@aol.com) -->
<!-- Web Site :  http : //www.angelfire.com/pa3/muddas -->
<!-- Modified :  Larry McClurg (larry@honeybells.com) -->

<!-- Begin
// Thank you Larry McClurg for the cross-browser fix
function whatFile() {
window.location = 'file:///' + document.form1.cmuds.value;
}
//  End -->
</ script >

</ head >

< body Background = .. / graphics / grayback.jpg >
< center >< BR >< BR >< BR >
< form name = form1 >
< input type = file name = "cmuds" >
< input type = button onClick = "whatFile()" value = "Open File" >
</ form >

</ center >
</ BODY >
</ html >

//Thanks to David Pye for his JavaScript Vault contribution.