Moonsoft Software Solutions

Hide delete button section

Started 28 Jun 2015 · 5 replies

  1. bsnline
    Hi,

    Please help me , code javascript to hide button delete only some section ?
    Thank you
  2. Moonsoft support
    Hi,
    you could use the function hide() to hide from user view any element of the calculator. If you insert the element inside a div with id="mydiv" for ex, you can hide it using:

    CB("#mydiv").hide();


    Hope this helps, regards
  3. bsnline
    Hi,

    Okay for hide div class,
    but I want to hide the button

    "Remove"

    i tried :

    CB("#cb_delete").hide();

    but not work

    suggestion ?

    thank you
  4. Moonsoft support
    Hi,

    To hide all delete buttons, selector should be class:

    CB(".cb_delete").hide();

    This will hide all delete buttons in all sections in your page. But if you want to hide buttons only in some sections, you should enclosure your section in a div with id (for example id="mysection"), and then add it to selector:

    CB("#mysection").find(".cb_delete").hide();

    This will only hide delete buttons on section selected.

    Regards,

    Moonsoft Team
  5. bsnline
    Hi, thank you for reply
    I tried both solution but not work.

    CB(".cb_delete").hide();
    CB("#mysection").find(".cb_delete").hide();
  6. Moonsoft support
    Hi,
    are you/user creating sections dinamically? Then the js code won't affect, as it executes once as soon as the page is ready. If this is your case, you can try to add css classes instead. You can use any css present at the page, the calcbuilder one, or add styles directly at the js tab 'write directly in html page'. You can add there style tags with the classes needed.

    Hope this helps, regards

Still stuck?

Customers with an active license can open a support ticket.

Log in to open a ticket