Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need help with given javascript/jquery Code

    Hi All,

    Can you please help me in correcting below code snippet?

    editableControl = $("<input class='cellValuesClass' style='width:98%;' value='" + value + "onblur=function1(this);function2('totalClass');"'/>'")
    .appendTo(currentCell);

    Regards,Vishu

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,037
    Thanks
    0
    Thanked 250 Times in 246 Posts
    Try this:

    Code:
    editableControl = 
        $('<input />')
            .addClass('cellValuesClass')
            .css('width', '98%') //why not add this style to the cellValuesClass or to a new class?
            .val(value)
            .on('blur', function() {
                function1(this);
                function2('totalClass');
            })
            .appendTo(currentCell);


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •