button lauching a file dialog

button lauching a file dialog

Hi,

I try to open a file chooser dialog when pressing a button. Here is what i have up to now.

  1. <html>
        <head>
            <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
            <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
            <script type="text/javascript" src="scripts/jquery.min.js"></script>
        </head>
        <script type="text/javascript">
            $('#button').file().choose(function(e, input) {
               alert(input.val()); //alerts the chosen filename.
            });
        </script>
        <body>
            <table border="0">
                <tr>
                    <td><input type="text" name="imagemaison"/></td>
                    <td><button>Rechercher</button></td>
                </tr>
            </table>
        </body>
    </html>   



















I took that example here http://plugins.jquery.com/plugin-tags/file-dialog

What am i doing wrong?

thanks