Hey all. I have a form with about 20 fields elements and I also have 4 hidden fields that I'm trying to send to the back end program. If I run the code as is but don't send any parameters in the URL, it returns the output from my back end program fine. If I send the URL parms, the back end code executes with all the parms having values, but I don't get any output back from the back end program.
I tried using escape(url) and although I'm able to get output returned, it's an error about the URL containing invalid syntax. The back end program simply does a "echo" type command of the input parms in a table format. If the URL parms are not sent, I get the table with the headers, but of course no data. Sending the URL parms I get nothing. I pieced together some of the JQuery code, but I created the "each" loop that creates the URL string. Since this is what I actually wrote, I'm thinking it is the issue. Any ideas? Here is the code: CODE BEGIN <input type="hidden" name="prowid" id="prowid" value=""> <input type="hidden" name="pdirectin" id="pdirection" value=""> <input type="hidden" name="sortfield" id="sortfield" value="default"> <input type="hidden" name="mode" id="mode" value=""> <form id="contactForm" onsubmit="return false;" action=""> <fieldset class="formfieldset"> <legend>Company/Name Information</legend> <label for="position" style="padding-top: 0px;">Function:</label> <select name="position" id="position" style="width: 200px;"></select><br /> <label for="dept" style="padding-top: 3px;">Department:</ label> <input type="text" id="dept" id="dept" class="ac_input contacttext" style="width: 200px;"><br /> <label for="ctitle">Title:</label> <input type="text" id="ctitle" id="ctitle" class="ac_input contacttext" style="width: 200px;"><br /> <label for="fname">First Name:</label> <input type="text" id="fname" id="fname" class="ac_input contacttext" style="width: 200px;"><br /> <label for="lname">Last Name:</label> <input type="text" id="lname" id="lname" class="ac_input contacttext" style="width: 200px;"><br /> </fieldset> <fieldset class="formfieldset"> <legend>Address Information</legend> <label for="addr1">Addr 1:</label> <input type="text" id="addr1" id="addr1" class="ac_input contacttext" style="width: 200px;"><br /> <label for="addr2">Addr 2:</label> <input type="text" id="addr2" id="addr2" class="ac_input contacttext" style="width: 200px;"><br /> <label for="city">City/St/Zip:</label> <input type="text" id="city" id="city" class="ac_input contacttext" style="width: 100px;"> <input type="text" id="state" id="state" class="ac_input contacttext" style="width: 30px;"> <input type="text" id="zip" id="zip" class="ac_input contacttext" style="width: 60px;"> </fieldset> <fieldset class="formfieldset"> <legend>Phone Information</legend> <label for="phone">Phone:</label> <input type="text" id="phone" id="phone" class="ac_input contacttext" style="width: 200px;"><br /> <label for="fax">Fax:</label> <input type="text" id="fax" id="fax" class="ac_input contacttext" style="width: 200px;"><br /> <label for="phone_800">800 Phone:</label> <input type="text" id="phone_800" id="phone_800" class="ac_input contacttext" style="width: 200px;"><br /> <label for="cell">Cell:</label> <input type="text" id="cell" id="cell" class="ac_input contacttext" style="width: 200px;"><br /> <label for="home">Home:</label> <input type="text" id="home" id="home" class="ac_input contacttext" style="width: 200px;"><br /> </fieldset> <fieldset class="formfieldset"> <legend>Email Preferences</legend> <label for="email">Email:</label> <input type="text" id="email" id="email" class="ac_input contacttext" style="width: 200px;"><br /> <label for="email2">Email2:</label> <input type="text" id="email2" id="email2" class="ac_input contacttext" style="width: 200px;"><br /> <label for="flyer1">Flyer 1:</label> <input type="checkbox" id="flyer1" id="flyer1" value="no"><br /> <label for="flyer2">Flyer 2:</label> <input type="checkbox" id="flyer2" id="flyer2" value="no"><br /> <label for="flyer3">Flyer 3:</label> <input type="checkbox" id="flyer3" id="flyer3" value="no"> </fieldset> <input type="button" name="btnPrev" id="btnPrev" value="Previous" onClick="$('#pdirection').val ('previous');getContactRow()"> <input type="button" name="btnNext" id="btnNext" value="Next" onClick="$('#pdirection').val('next');getContactRow ()"> <div id="actionButtons" class=""> <input type="submit" name="btnAdd" id="btnAdd" value="Add Contact" onClick="$('#mode').val('add');" /> </div> <!-- actionButtons --> </form> // Add, Update and Delete action $(document).ready(function() { // attach a submit handler to the form $("form#contactForm").submit(function() { var url = "../pu/puajax-h.html?mode=" + $("#mode").val(); $("input").each(function () { if(this.id != "mode" && $("#" + this.id).val() != '') url+= "&" + this.id + "=" + $("#" + this.id).val(); }); alert("URL: " + url); //url = "../pu/puajax-h.html?mode=" + $("#mode").val(); $('#msgCenter').load(url); //alert("After load " + document.getElementById ("msgCenter").innerHTML); }); }); CODE END