views:

11

answers:

0

Hi all,

I use spryvalidation in my forms, a situation comes when i create input elements dynamically which then create the validation instances dynamically. the problem comes when a user tries to delete an input element...the javascript object still remains. how can i delete the object dynamically on client side or in short how can one delete or reset a javascrit object instance?

var par = new Spry.Widget.ValidationTextField('part');

And this is the delete function

function del(count)
{
    var count;
    if(count=='0')
    {
        $('#delete'+count+'').attrib('disabled','');
    }


    else
    {
        $('.user_details' + count + '').remove();


    }

}

Thnx.