<?php require("dialogs/dialog.inc.php");
$dialog=new DIALOG(dirname(dirname(__FILE__))); //Path initial to directory i.e /path/to/your/directory $dialog->setBaseDir("dialogs"); // path/to/dialog folder $dialog->setFileType("html,htm,php,txt,doc,pdf"); ?> <html> <head> <title>Open dialog test</title> <script language="javascript"> function openFile(value) { alert("You have selected :"+value); } function newFile(value) { alert("You have selected :"+value); } function saveFileAs(value) { alert("You have selected :"+value); } </script> </head> <body> <input id='openfile' > <?php $dialog->showDialog();?> Open File<br> <input id='openfile' > <?php $dialog->setDialogType(DIALOG_SAVE); $dialog->showDialog();?> Save File <br> <input id='openfile' > <?php $dialog->setDialogType(DIALOG_SAVEAS); $dialog->showDialog();?> SaveAs File </body> </html>
|