Announcement

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

#1 2010-05-28 11:02:05

tommi
Xinha Community Member
Registered: 2010-05-20
Posts: 10

How to javascript formcheck?

How can a precheck if the user has written any content at all before sending the form?

The usual way - if (document.getElementById("myeditor").value) ... - does not work when using xinha together with the textarea "myeditor" (name and id = "myeditor").

So how can i find it this using xinha to give the user an alert and stop submitting the form.

Thanks for any help.

Offline

#2 2010-05-28 22:37:33

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: How to javascript formcheck?

search getHTML


James Sleeman

Offline

#3 2010-05-29 05:07:38

tommi
Xinha Community Member
Registered: 2010-05-20
Posts: 10

Re: How to javascript formcheck?

Thank you,

calling document.myform.onsubmit() did to me. This updates the textarea element without sending the form so i could check the content after that with usual methods.

Offline

Board footer

Powered by FluxBB