Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-03-10 00:05:37

stu
New Member
Registered: 2006-03-09
Posts: 8

post comment via javascript submit()

i’ve been struggling with this for too long now … does anyone know if it’s possible to submit a comment using javascript:form.submit()?

It seems that textpattern requires the submit input (named submit, value=Submit … by default – a button) to be present on the page from which a comment is submitted. I’ve changed this button to a hidden field and am using a text link with an href=“form_to_submit.submit()” (and a few variations on that) … which works fine for previews (which require the same sort of thing, only named “preview”).

The problem is that submit() breaks when an element on the page named “submit” exists (error given: “submit is not a function”). i can get the preview, search, etc, all to work fine using submit() … it’s just that damned final submission

the solution i have in mind at this point, is to find where in textpattern it is checking for the presence of the submit button and overiding that … but i’m open to any other solutions as well

any input’s appreciated
thanks!

Last edited by stu (2006-03-10 00:07:56)

Offline

Board footer

Powered by FluxBB