You are not logged in.
Pages: 1
When I try to save form by javascript, I lose my data:( I think I must save the iframe content to the textarea, but I don't now - how?:(
Last edited by glebushka (2005-03-24 18:33:35)
Offline
you must first call
form.onsubmit();
then
form.submit();
...we should open a FAQ-wiki page!!
Niko
Offline
Yes. I have read this solution, I write in my source:
document.edit.onsubmit();
document.edit.submit();
In JavaScript console I receive error:
Error: document.edit.onsubmit is not a function
I use FF 1.0.x
Offline
NOT
document.edit.onsubmit();
document.edit.submit();
But
form.onsubmit();
form.submit();
Offline
form.onsubmit();
Error: form is not defined
I have following form tag:
<form action="http://my_url" method="post" enctype="multipart/form-data" id="edit" name="edit">
Hm... I try to submit with submit-button, but it dosn't work anyway...What may caused this problem? Any ideas?
I have other javascripts on the page. I'll try to remove them.
Offline
mmcw wrote:form.onsubmit();
Error: form is not defined
I have following form tag:
<form action="http://my_url" method="post" enctype="multipart/form-data" id="edit" name="edit">
Hm... I try to submit with submit-button, but it dosn't work anyway...What may caused this problem? Any ideas?
I have other javascripts on the page. I'll try to remove them.
Try
var form = document.getElementById("edit");
form.onsubmit();
form.submit();
You can simplify the code required in an onclick with:
function customSubmit(formname) {
var form = document.getElementById(formname);
form.onsubmit(); form.submit();
}
Offline
I don't understand. Why doesn't work http://abik.ru/cgi-bin/try.pl ?
This test form process perl script. Received values "content" and "content1" insert in corresponding textareas.
Second textarea (without Xinha) work. But first doesn't. Why?
Offline
try to add this
HTMLArea._addEvent(html_editor._htmlArea, "mouseout", function () {
html_editor._textArea.value = html_editor.getHTML();
});
or put such code when you want
Offline
try to add this
HTMLArea._addEvent(html_editor._htmlArea, "mouseout", function () {
html_editor._textArea.value = html_editor.getHTML();
});
or put such code when you want
Offline
As I see html_editor in my case is xinha_editors['content']. I insert your strings after HTMLArea.startEditors(xinha_editors);
But it doesn't work anyway (see http://abik.ru/cgi-bin/try.pl)
Can anyone show me realy working form with Xinha (with FF1.0.x)?
Offline
I use it everyday in a form with that function...
html_editor is the HTMLArea created... so that is what you have done but the editor is not created so the problem comme from that gecko editor needs EnterParagraph plugin which is not declared (this is for me a stupid thing...)
try to declare it
Offline
I use it everyday in a form with that function...
html_editor is the HTMLArea created... so that is what you have done but the editor is not created so the problem comme from that gecko editor needs EnterParagraph plugin which is not declared (this is for me a stupid thing...)
try to declare it
Offline
guillaumed, I declared EnterParagraphs plugin. But it doesn't work:( Can you show me your working code (if it is possible, whole page)? Post there or on my e-mail - gleb at stalnoy.ru. Thx.
Offline
Give me your email cause I cannot send you one thru this forum (I don't know why...)
Offline
Thanks for all, especially for guillaumed. The problem was much more simple that we thought.
If we write in code:
<table>
<form>
It doesn't work.
But if we first write tag <form>, and then <table>. It works perfectly. I think this is a bag.
Offline
Pages: 1