I have a form where the user can enter a link, click on the "Add Link" button, and that After the link (via JQuery) the problem added in the form of a hidden area is that when I submit the form it is not posting it is actually starting to entangle me. The thing is that If I encrypt hidden fields in the form, then Is posted, but my function is not working for some reason. The hidden area adds to my form, as I can see with firebug but this post is not being sent along with the data.
Just to note, I am using an array in Javascript to capture the elements, the form is submitted, which also shows the user to see the actions they have added. . I am using the [] notation on the element's "Name" field because I want PHP to have links to feed in the array.
Here is the link presentation that is linked to my form:
function make_hidden_element_tag (item_type, item_content, item_id) {return '& lt; Input type = "hidden" name = "'+ item_type +' []" id = "hidden_link_ '+ item_id +'" value = "'+ item_content +" / "gt;';
Does anyone know why this post can not be done as mentioned above, any link-coded tag, which is nearly identical to the above works, it is fine that this tag does not work Here's how I am adding tags to jQUery:
$ ('# link_td'). Attachments (make_hidden_element_tag ('links', link, link_array.length - 1));
I Kohana 3 I'm using the framework, though I'm not sure there is any effect on this because it is actually not doing anything since that time the HTML page is added and the submit button is pressed.
If the data is not being posted to the server, the input element is definitely not being added to the form .
Before submitting the form, execute the following part of the code. Try:
& lt; Form onsubmit = "return doBeforeSubmit (this);" & Gt; ... & lt; / Form & gt;
And the function is ...
function doBeforeSubmit (form) {var es = form.elements; Var l = es.length; Var msgs = []; (Var idx = 0; idx & lt; l; idx ++) {var e = es [idx]; Msgs.push ('name =' + e.name + ', type =' + e.type + ', value =' + e.value;} alert (msgs.join ('\ n')); return; }
If you do not receive your field, then "Input" form is not added anywhere else.
If you receive the field .. We will need a deep dig.
Comments
Post a Comment