You can try this.

1. Create this function:

function bindButtons () {
$('#bold,#italic,#underline').unbind().click(function() {
                        $('#body').append($(this).val());
}

2. change the ready function:
       $(document).ready(function() {

                $('#journalForm').ajaxForm({
                        dataType:  'json',
                        success:   process
                });

                function process(json) {
                        blah blah blah irrelevant
                }

               bindButtons();

                });
        });

3. Add this code to your submit event, for example:
$.ajaxSubmit ( {   success:bindButtons()       })


On Jan 23, 12:00 am, drewtown <drew.t...@gmail.com> wrote:
> I am writing a user input form and I have buttons set up that add [b]
> [i][u] etc tags to the form like BBCode.  The user can then submit it
> (uses the jquery.form plugin) and everything works fine.  If the user
> then tries to type more and use the buttons again the buttons don't
> append to the textare anymore.
>
> Any ideas
>
> [code below]
>
>         $(document).ready(function() {
>
>                 $('#journalForm').ajaxForm({
>                         dataType:  'json',
>                         success:   process
>                 });
>
>                 function process(json) {
>                         blah blah blah irrelevant
>                 }
>
>                 $('#bold,#italic,#underline').click(function() {
>                         $('#body').append($(this).val());
>                 });
>         });

Reply via email to