0

I have the form and works fine. On submit I have no idea where the data is going. I want it to go into a table on the same page. What am I doing wrong?

<form id="myForm" action="" method="post" target="_parent">

<p>Date: 
  <input type="date" cf_name="Date" value="" maxlength="25" size="60">


Weight:
    <input type="text" cf_name="Weight" value="" maxlength="25" size="60">
</p>

<p>Comments:
    <input type="text" cf_name="comments" value="" maxlength="200" size="60">
</p>

<p>Insert Picture (optional):
    <input type="text" cf_name="pic1" value="" maxlength="200" size="60">
</p>


<p> 
  <input id="submit" type="button" value="Submit" cf_name="submit">
  <input type="button" cf_name="cancel" value="Cancel" onClick="closebox()">
</p>
</form>

<table id="details"></table>
0

Couple of things with this. Your action attribute is empty. That's the attribute that tells the browser where to send the posted form data. Should be a field or if you're using AJAX, I always put # in there and let the javascript do it's thing.

Not sure about the cf_name attribute in your input fields. I seem to remember that might be an implementation of Adobe ColdFusion but it's certainly not HTML compliant.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.