Yes valid markup rocks! I never thought of moving my form elements
around like I did so I thought posting my temporary solution might be
helpful to some. As I said temporary solution is the key phrase there.

I was able to get one of my buttons working as needed but am having
issues with my other button that has a showRequest and showResponse
function associated with it. Below is the working code for my button
when the button is placed inside the form element. What I want to do
is move my submit button outside the form and have the form submitted
via a click action. I tried moving my submit button outside the form
and it still works just fine and dreamweaver is saying my code is
valid. Also this seems to work in IE 7, FF, Safari and Chrome on my
PC. If I was not working locally I would be more then happy enough to
post my code for additional help/comments.

My working code is below.

<script>
$(document).ready(function() {
var options = {
                        beforeSubmit:  showRequest,
                        success:       showResponse
        }

                $('#addNewTasks').ajaxForm(options);
});// end document ready


// pre-submitcallback
        function showRequest(formData, jqForm, options) {
                                //alert('About to submit');
                                var formElement = jqForm[0];
                                return true;
        }

        // post-submitcallback
        function showResponse(responseText, statusText)  {
                                //alert('Submitted and will now show up once 
this alert is
closed.');
                                $.get('includes/tasks.cfm',{},function(data){
                                         $('#newTasks').html(data);
                                         $('ul:last').fadeIn("slow");
                                })
        }
</script>

Any help with it would be great! Thanx in advance.

John

Reply via email to