File Selection not working


I have added the OpenDlgFile function to UserMain exactly as per your documentation. I am trying to include a file selection process in a very simple input form but I cannot get the open file dialog to work.

This is the form code I am using:

                        <label id="plate-select-lbl" title="" for="file-select">
                            Select a Plate Data File:<br />
                        // Executes HEScript to call the system dialog "Open"...
                        $filename = exo_return_hescriptcom("UserMain.OpenDlgFile", "Error");  

                        // The $filename variable contains the full path to the file selected by the user. It can be passed to fopen for instance.  

                        if (empty($filename))
                        echo "You have not selected any file. Operation canceled<br>";
                        <input id="file_id" class="readonly" type="hidden" readonly="readonly" value="<?php echo $filename;?>" name="file_id">  

                        echo "<br />" . $filename . "<br />";

The file open dialog does not work at all but the echo statement returns the path to the compiled executable program:

C:\Work\JSW Steel\Data Plot Project\plot_data.exe

I have attached a PNG screenshot of the compiled app. Any thoughts would be appreciated.

Okay, I have solved this one by moving the file selection to a separate form all by itself. This should not need to be the case but it is.