Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2007-10-23 07:22:21

matej
New member
Registered: 2007-10-14
Posts: 5

SaveSubmit and submitting form via onclick

Hi,

I was just wondering... how (if it is possible) could I call the same function as it is being called when a user clicks on a "Save" button when SaveSubmit in enabled? I would like to make a menu where there would be an option "Save" and directly call that function.

Thanks for help and any ideas,
Matej

Offline

#2 2007-10-23 07:34:39

matej
New member
Registered: 2007-10-14
Posts: 5

Re: SaveSubmit and submitting form via onclick

OK, guys, sorry... I have just found a solution on the forum... it is available at http://xinha.gogo.co.nz/punbb/viewtopic.php?id=1102 if anyone needs it smile

Offline

#3 2007-10-23 08:02:41

matej
New member
Registered: 2007-10-14
Posts: 5

Re: SaveSubmit and submitting form via onclick

I know this is silly, but the code I have it's not working and this could be me...

I have:

function saveme()
{
var editor = xinha_editors.xinhaeditor;
editor._toolbarObjects.savesubmit.cmd();
}

and then I have a link in the file where there is xinha like:
<a href="javascript: saveme()">Save</a>

When I click on the link, I get this "Saving in progress" text in xinha, but after that I get an error '_textArea is null or not an object' and the form isn't submitted.

My Javscript knowledge is somehow roasted and help / advice would be excellent and much appreciated.

Thank you in advance,
Matej

Offline

#4 2007-10-23 15:07:02

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: SaveSubmit and submitting form via onclick

I'm sorry, this was my fault. It has to be

function saveme()
{
var editor = xinha_editors.xinhaeditor;
editor._toolbarObjects.savesubmit.cmd(editor);
}

Offline

#5 2007-10-23 17:07:39

matej
New member
Registered: 2007-10-14
Posts: 5

Re: SaveSubmit and submitting form via onclick

Great, thank you!

Offline

Board footer

Powered by FluxBB