Thanks for the response I do appreciate it.  I tried your code and was
not having any look so I looked at the jquery form plugin docs and
found this little gem

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

resetForm: true.  worked quite well.

Thanks and sorry for wasting your time.

Drew

On Jan 22, 7:51 pm, Ami <aminad...@gmail.com> wrote:
> This is the code:
> function bindButtons () {
> $('#bold,#italic,#underline').unbind().click(function() {
>                         $('#body').append($(this).val());
>
> }
>
>    $(document).ready(function() {
>
>                 $('#journalForm').ajaxForm({
>                         dataType:  'json',
>                         success:  function ()  {process();bindButtons
> ()}
>                 });
>
>                 function process(json) {
>                         blah blah blah irrelevant
>                 }
> bindButtons()
>                 });
>         });
>
> On Jan 23, 3:49 am, Ami <aminad...@gmail.com> wrote:
>
> > 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