Errors using forum-plugin
Hello all,
I am using the Malsup Forum Plugin to upload files on a few pages. I have recently run into a problem. I believe it is related to how I am handling the callback. I am doing this all on one page, I have a structure like this:
somepage.php
- <?php
- //check for file upload here and store a reference to the file in the db and a copy on the server
-
- ?>
- <div id = "cont">
- <form id = "test_form" action = "somepage.php" name = "test_form" enctype="multipart/form-data" method = "POST">
- <p>
<input type = "text" name = "name" id = 'name' />
</p>
<p>
<input type = "file" name = "file" />
</p>
<p>
<input type = "submit" value = "submit" />
</p>
- </form>
- </div>
- <script type = "text/javascript">
- $("#test_form").submit(function(){
- $(this).ajaxSumbit({
- success:function(data){
$("#cont").html(data);
}
- });
- return false;
- });
As you can see the form is in the "cont" div, when it is submitted it is submitted to the same page it is on. The results are dynamically placed in the "cont" div. This is causing an error. IE is throwing an "Object expected" error, and sometimes just a general "Errors on this page may cause it not to work" while in Firebug I see "$ is not defined". I know it has to do with the callback. If anyone could offer a possible solution to this problem I would very much appreciate it. Thanks much!