You are not logged in.
At first I just wanted to have a plugin so that I don´t have to register a save button in my config file that submited the form via onsubmit()/submit(). But then i had the idea to post the data asynchronously which turned out to be a much cooler thing because this way the whole editor has not to be constructed again. Then added some feedback message for user confidence and a keyboard shortcut, and now I think it´s gotten a handy one.
Offline
Hello Ray. I like this plugin because its fits exactly to my wishes (see your reaction on my post). I installed it, but it dosn't work. The icon appears and changes to red when I change the area, but when I want to save (submit) it, nothing happens. Can you tell me how to embed this in HTML? Now I use:
<FORM NAME="editform" ACTION="/cgi-bin/edit/edit_2.pl">
<TEXTAREA id="PageText" name="PageText" style="width:90%;height:800px" wrap="off">
<input type="submit" value="Opslaan">
</FORM>
What to do with the input tag?
Last edited by wijnand (2006-03-12 12:25:35)
Offline
I changed the first row in:
<FORM METHOD="POST" NAME="editform" ACTION="/cgi-bin/edit/edit_2.pl">
because of the lenght of the data. Its still not working.
Offline
Hi,
you don't need the submit button, because the data is submitted without an actual submit, in the background. It takes the url from the action attribute of the form, so you are OK there. You have to set up your (php/perl-)script that it listens for a POST with the name of the textarea for saving, and it has to print out something when it has received the data. In the moment the plugin waits only to get anything back(it does not account errors), but you could change line 121 to
self.setMessage(getback);
to show what the server says.
Hope you get it to work!
Last edited by ray (2006-03-14 05:16:16)
Offline
My complaint is almost the same. "The icon appears and changes to red when I change the area, but when I want to save (submit) it" I get an error.
Perhaps you could show us an example ?
Offline
I'm so sorry! It was really my fault. There was a suffix to the URL that was a remainder of how I use it with serveral GET parameters, but it broke a simple URL. So, please try it again, I have attached an updated version to the ticket: http://xinha.python-hosting.com/ticket/628
Once again a note on the usage:
This should be more or less a drop-in replace for a normal submit button. It takes the action URL from the
HTML form and sends the data from the textarea in a HTTP post with the name of the textarea.
Last edited by ray (2007-01-18 08:54:58)
Offline
Unfortunately, I get the same results, with version 2 as well as version 3. The "light" of your button changes from green to red as soon as I type something, but I get an error when I press it.
This is my form. BTW I get the same results when I use method=get.
<FORM name="FORM1" id="FORM1" method="post" action="savesubmit.php">
<textarea id="myTextArea" name="myTextArea" rows="5" cols="55" style="border:1px #cccccc solid;width:800px;height:350px;"></textarea>
</form>
Offline
Have a look at this:http://raimundmeyer.de/xinha/examples/testbed.html
In this example the savesubmit.php is located in the same folder like the testbed.html and it's simply
<?php
print_r($_POST);
?>
for demonstration purposes.
The problem is not your form I have tested this.
What kind of error do you get? Does it work with a "real" submit button? Is the URL of the action right?
Last edited by ray (2006-03-20 12:00:41)
Offline
Hi Ray,
your example works fine for me. My page works fine when I press the submit-button.
Translated, with Internet Explorer I get
Line: 165
Character: 7
This method is not supported by this object.
Code: 0
In Mozilla, I get "transferring data..." and that's it. But Xinha still works.
Offline
Well, I have to admit I'm a little clueless what this is supposed to mean. there is nothing in line 165 that looks like it could break it.
Maybe I can have a look at your page?
I'm very unhappy that this is causing such trouble, and also curious what's going on.
Offline
I appreciate the attention you give this, Ray. Many thanks.
To make it more curious: I have copied your source to
http://www.400bis.nl/savesubmit.html
Still won't work
The contents of my savesubmit.php is
<?php
print_r($_POST);
echo "done";
?>
Offline
OK, got it!
I knew it had to have something to do with a differing htmlarea.js. The thing I didn't have in mind is that I'm using the code of the loading message which existed already some time as a patch. And this patch has introduced some new functions, that weren't there in your version!
So it meets well that the patch has just become official. You jast can update your version, rev 421 is abit datet anyway
Offline
The plugin works fine with multiple Xinha-textareas, but there's one small flaw. The "saving..."-message appears above the first textarea when you press the savesubmit-button on one of the others.
Offline
I just downloaded Xinha and SaveSubmit a few hours ago.
I am getting "An error has occurred: Not Found" when I click on the "Save" icon.
Does this mean it can't find the page I am submitting to? (I am supplying the full url) Or is there something else it isn't finding?
Thanks,
L
Offline
Please, take a look at this ticket:
http://xinha.python-hosting.com/ticket/882
Offline
OK, with some server-side decodings it works perfectly well.
The plugin is beautiful, so here is my little contribution:
http://pro.kiwistudio.ru/xinha/plugins/ … lang/ru.js
It's the Russian translation, as you can see.
Thanks again for the plugin.
Offline
I'm not sure what does this plugin do. Does it saves the content into a file? In that case... In which file does it save?
I have the button got red when I write something and when I press the button, it says "saving" but nothing else happends.
Offline
It's really simple: It does not more than what would happen with an HTML submit button. The data of the form is sent to the URL defined in the action attribute of the form. Any further action is up to the server-side script.
Offline
Sorry to rake up an old post...
I've used FCKEditor up till now, and therefore I'm used to the save-button doing nothing more than submitting the form. Ive replaced fck with xinha to test it now, and it does show me the page I'm supposed to be redirected to very shortly, and it does process the form, but then it remains on the editor-page.
Is there anything I can do to change this behaviour? I would like it to submit the form to the action-url, nothing more. Of couse I could put in a submit-button, but that kinda kills the "MS Word-feeling"...
Offline
I could add a switch to the plugin, if you really ask me for, though I'd rather suggest you to simply add a button to the toolbar using the code below
// create the button
// parameters: id, tooltip ,image url, whether button should be enabled in text mode, the function to call on button click
xinha_config.registerButton("save", "Save", _editor_url + "images/ed_save.gif", true, function(editor) {editor._textArea.form.submit()});
// add the button to the toolbar
// parameters: id (the one given above), next to which button, before|replace|after (-1,0,1)
xinha_config.addToolbarElement("save", "popupeditor", -1);
Offline