« Return to Thread: Idea for comments.php

Re: Idea for comments.php

by Roland Haeder :: Rate this Message:

Reply to Author | View in Thread

On Tuesday, 3. October 2006 00:52, Austin Matzko wrote:

> On 10/2/06, Roland Haeder <webmaster@...> wrote:
> > Some people (may) like to add some JavaScript pre-checking (e.g. useful
> > for AJAX) to their plugins (contact forms, wherever the "blog reader" has
> > to interact with the blog).
> >
> > Currently you have to "hack" comments.php a little but what about a
> > filter-based solution? So plugin coders can very easy add their
> > JavaScript to a onsubmit and onreset "stub".
>
> Why not put the JavaScript in the header, via the wp_head action hook?
The reason for this is that some want to pre-check via this code:

<!-- Somewhere in the a-tag: //-->
onSubmit="return submitHook();" onReset="return resetHook();"

Now we "just" need to add something like this inside of the <form></form>
comtainer and everyone is happy:

<?php wp_javascript(); ?>

Inside wp_javascript() we must check if the user wants to submit a comment or
something else.

Just an idea. :-)

--
(GNU) PGP ID: 0x8C8859B9

Weblog:
http://blog.mxchange.org
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

 « Return to Thread: Idea for comments.php