javascript - Issue with multipart/form-data, ajax and textarea with TinyMCE -
I am working with HTML / php / ajax / jquery and today I have pointed out a small problem which is driving me crazy
I have an html form:
& lt; Form method = "POST" enctype = "multipart / form-data" name = "myForm" id = "MyForm" action = "" & gt; & Lt; Label class = "form-label" & gt; No & lt; / Label & gt; & Lt; Input name = "noam" type = "text" class = "form-control" & gt; & Lt; Br> & Lt; Label class = "form-label" & gt; Descriptzon & lt; / Label & gt; & Lt; Textarea name = "descrizione" id = "text-editor" placeholder = "class =" form-control "rows =" 10 "& gt; & Lt; / Textarea & gt; & Lt; Label class = "form-label" & gt; Stato & lt; / Label & gt; & Lt; Select name = "stato" id = "source" style = "width: 30%" & gt; & Lt; Option value = "1" & gt; Abilitato & lt; / Options & gt; & Lt; Option value = "0" & gt; Disabilitato & lt; / Options & gt; & Lt; / Select & gt; & Lt; H4 & gt; Photo profile & lt; / H4 & gt; & Lt; Input type = "hidden" name = "MAX_FILE_SIZE" value = "20400000" & gt; & Lt; Input style = "border: 0 pixels;" Type = "file" name = "user_foto" id = "file" & gt; & Lt; Div class = "form-action" & gt; & Lt; Div class = "pull-right" & gt; & Lt; Button type = "submit" class = "btn btn-success btn-opposition" & gt; & Lt; I class = "icon-ok" & gt; & Lt; / I & gt; Insertions & lt; / Button & gt; & Lt; Button type = "button" class = "btn btn-btn-btn-opposition" onclick = "window.location.href = 'index.php'" & gt; Indistro & lt; / Button & gt; & Lt; / A & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Form & gt; I am working with a JQuery + Ajax script which is capable of firing a php script without reloading the page, and in a table in my database Enter data:
Here is my PHP code:
Everything works apart from a magic textarea content It seems that the content of the passenger will not be sent to my PHP script.
The solution to the problem. I add onclick = "tinyMCE.triggerSave (true, true); to submit button and everything works like a magic, I think it's a There should be a small MEE bug.
Comments
Post a Comment