Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8618969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:13:53+00:00 2026-06-12T06:13:53+00:00

I have an event what on select adds to my bootstrap html editor the

  • 0

I have an event what on select adds to my bootstrap html editor the right text value. The problem is that each time there is a select the html toolbar is getting added so I have a lot toolbar up there. I would like to destroy before creation, but I don’t really know how. The code look as it follows

$('a.open_dialog').click(function(e) {
        e.preventDefault();
        var tabsDiv=$('<div />').appendTo('body').load($(this).attr('href'),function(){
        $('#tabs').tabs();
        $('select#state').live('change',function() {

            $('.textarea').empty().wysihtml5().data("wysihtml5").editor.setValue(getCustomText($('select#state').val()));

        });

        $( "#datepicker" ).datepicker();        
        })
        .dialog({

            title: $(this).attr('title'),
            modal: true,
            draggable: false,
            width: 800,
            position: 'top',
            buttons: {
                "Speichern": function() {
                    open: { $(this).addClass('b') }
                    $.ajax({
                           type: "POST",
                           url: 'action.php',
                           data: $("#edit_form").serialize(), // serializes the form's elements.
                           success: function(data)
                           {
                               alert('Der Datensatz wurde gespeichert!'); // show response from the php script.
                           },
                            error:function(){

                               alert('Es gibt ein Fehler bei Daten übetragung!');

                            }
                         });

                },
                "Email schicken": function() {

                    $.ajax({
                           type: "POST",
                           url: 'mailer.php',
                           data: $("#contactform").serialize(), // serializes the form's elements.
                           success: function(data)
                           {
                               alert('Das Email wurde geschickt!'); // show response from the php script.
                           },
                           error:function(){

                               alert('Es gibt ein Fehler bei Daten übetragung!');

                            }
                         });
                },

                "Rechnung herunterladen":function() {

                    $.ajax({
                           type: "POST",
                           url: 'docsx.php',
                           data: $("#edit_form").serialize(), // serializes the form's elements.
                           success: function(data)
                           {

                               window.location.href ='rechnung.docx'; // show response from the php script.
                           },
                           error:function(){

                               alert('Es gibt ein Fehler bei Daten übetragung!');

                            }
                         });

                    }

            },
            close: function() {
                tabsDiv.remove() // so I can reload again
                location.reload(true);
//              allFields.val( "" ).removeClass( "ui-state-error" );


            },
        });


        return false;
    }); 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T06:13:55+00:00Added an answer on June 12, 2026 at 6:13 am

    Try this

    Look in the documentation whether there is a destroy method to remove the toolbar..
    You can also take one more approach where in you remove the contents completely and add the content again and reassign the toolbar..

    UPDATED

    Why do you have the change event nested inside the click event.. If you do that then every time the dialog is opened a new change event is associated with it.. Try moving it out of the
    click event.. Also make sure you delegate the events by using .on()

    Try unbinding and assigning the event.. We are not supposed to unbind and bind over and over as it is an antipattern .. But check if this works

    $('select#state').unbind().live('change', function() {
              $('.textarea').empty().wysihtml5().data("wysihtml5").editor
                .setValue(getCustomText($('select#state').val()));
            });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have event Button that creates text box in run time. Private Sub Button1_Click(ByVal
I have the following: <select id=price_select></select> I have an event handler that invokes the
Input rz value In the head I have: Event.observe(window, 'load', function() { $$(input).each(function(field){ Event.observe(field,
I have a third-party js function that dynamically adds/removes options to a SELECT element
I have a SELECT element which adds its value to a hidden INPUT via
I have a simple webpage that adds & deletes options from a select element
I have capture change event on drop down select. This drop down field is
I have a simple query in php on oracle: $query='select u.username,u.lastname,u.firstname,c.event,c.reason from users u,
I have event manager process that dispatches events to subscribers (e.g. http_session_created, http_sesssion_destroyed). If
I have a dropdownlist which is declared as follows: <select onchange=reloadValues(this,event);> ... options here

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.