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>
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>
Share
Improve this question
edited Nov 4, 2017 at 15:18
dealer58
asked Nov 4, 2017 at 13:18
dealer58dealer58
11 bronze badge
1 Answer
Reset to default 1Couple 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.