Submits a form by calling `click` on a button element or `submit` on a form element
509648
function (invokeOn, invokeFunction) {
		if (invokeOn && typeof invokeOn !== "function" && invokeFunction) {
			if (invokeFunction == "click") {
				setTimeout(function () {
					$(invokeOn).click(); // Very particular: we MUST fire the native "click" event!
				}, 5);
			} else if (invokeFunction == "submit")
				$(invokeOn).submit(); // For submit(), we have to use jQuery's, so that all its submit handlers fire.
		}
	}
1183098
function() {
        if (this.textarea.element.form) {
          var hiddenField = document.createElement("input");
          hiddenField.type   = "hidden";
          hiddenField.name   = "_wysihtml5_mode";
          hiddenField.value  = 1;
          dom.insert(hiddenField).after(this.textarea.element);
        }
    }
1228609
function(element) {
            $('.editable-open').each(function(i, el){
                //do nothing with passed element and it's children
                if(el === element || $(el).find(element).length) {
                    return;
                }

                //otherwise cancel or submit all open containers 
                var $el = $(el),
                ec = $el.data('editableContainer');

                if(!ec) {
                    return;  
                }
                
                if(ec.options.onblur === 'cancel') {
                    $el.data('editableContainer').hide('onblur');
                } else if(ec.options.onblur === 'submit') {
                    $el.data('editableContainer').tip().find('form').submit();
                }
            });

        }
481644
def submit_form_action(self, url):
    
    form = ElementSelector(
        world.browser,
        str('//form[@action="%s"]' % url),
    )
    assert form, \
        "Cannot find a form with action '{}' on the page.".format(url)
    form.submit()
160571
function _handleClick() {
    perfBar.el.querySelector('.perfBar-bar').addEventListener('click', function(e) {
      perfBar.el.classList.toggle('perfBar-is-active')
    })
  }
804393
public function submitContentForm() {
    $element = $this->getSession()->getPage();
    $submit = $element->findButton($this->getDrupalText('node_submit_label'));
    if (empty($submit)) {
      throw new \Exception(sprintf("No submit button at %s", $this->getSession()->getCurrentUrl()));
    }
    // Submit the form.
    $submit->click();
  }
905235
function() {
			var editor = this,
				element = editor.element,
				form = new CKEDITOR.dom.element( element.$.form );

			// If are replacing a textarea, we must
			if ( element.is( 'textarea' ) ) {
				if ( form ) {
					form.on( 'submit', onSubmit );

					// Check if there is no element/elements input with name == "submit".
					// If they exists they will overwrite form submit function (form.$.submit).
					// If form.$.submit is overwritten we can not do anything with it.
					if ( isFunction( form.$.submit ) ) {
						// Setup the submit function because it doesn't fire the
						// "submit" event.
						form.$.submit = CKEDITOR.tools.override( form.$.submit, function( originalSubmit ) {
							return function() {
								onSubmit();

								// For IE, the DOM submit function is not a
								// function, so we need third check.
								if ( originalSubmit.apply )
									originalSubmit.apply( this );
								else
									originalSubmit();
							};
						} );
					}

					// Remove 'submit' events registered on form element before destroying.(#3988)
					editor.on( 'destroy', function() {
						form.removeListener( 'submit', onSubmit );
					} );
				}
			}

			function onSubmit( evt ) {
				editor.updateElement();

				// #8031 If textarea had required attribute and editor is empty fire 'required' event and if
				// it was cancelled, prevent submitting the form.
				if ( editor._.required && !element.getValue() && editor.fire( 'required' ) === false ) {
					// When user press save button event (evt) is undefined (see save plugin).
					// This method works because it throws error so originalSubmit won't be called.
					// Also this error won't be shown because it will be caught in save plugin.
					evt.data.preventDefault();
				}
			}

			function isFunction( f ) {
				// For IE8 typeof fun == object so we cannot use it.
				return !!( f && f.call && f.apply );
			}
		}
234897
function () {

            var aButtons = this.cfg.getProperty("buttons"),
                oButton,
                oElement;

            if (aButtons && Lang.isArray(aButtons)) {
                oButton = aButtons[0];
                if (oButton) {
                    oElement = this._getButton(oButton.htmlButton);
                    if (oElement) {
                        /*
                            Place the call to the "focus" method inside a 
                            try/catch block to prevent IE from throwing 
                            JavaScript errors if the element is disabled 
                            or hidden.
                        */
                        try {
                            oElement.focus();
                        } catch(oException) {
                            // ignore
                        }
                    }
                }
            }
        }
1211706
function onClick (ev, elements) {
  var model = this._Ampersandview.model;
  var partition = model.filter.partitions.get(1, 'rank');

  if (elements.length > 0) {
    partition.updateSelection(partition.groups.models[elements[0]._index]);
    model.filter.updateDataFilter();
    app.me.dataview.getData();
  }
}
403866
function() {
      
     var that = this;
      
     this.dialog = new inputEx.widget.Dialog({
				id: this.options.dialogId,
				inputExDef: {
				         type: 'form',
			            fields: this.options.fields,
			            buttons: [
			               {type: 'submit', value: msgs.saveText, onClick: function() { that.onDialogSave(); return false; /* prevent form submit */} },
			               {type: 'link', value: msgs.cancelText, onClick: function() { that.onDialogCancel(); } }
			            ]
				      },
				title: this.options.dialogLabel,
				panelConfig: this.options.panelConfig
		});
		
		// Add a listener on the closing button and hook it to onDialogCancel()
		YAHOO.util.Event.addListener(that.dialog.close,"click",function(){
			that.onDialogCancel();
		},that);
		
   }
1261532
public function submitForm($xpath) {
    $element = $this->findElement($xpath, 1);
    $tagName = $this->browser->tagName($element["page_id"], $element["ids"][0]);
    if (strcmp(strtolower($tagName), "form") !== 0) {
      throw new DriverException("Can not submit something that is not a form");
    }
    $this->browser->trigger($element["page_id"], $element["ids"][0], "submit");
  }
979679
function bindToClick(selector, handler) {
    var elems = document.querySelectorAll(selector);
    var i = -1;
    var len = elems.length;
    while (++i < len) {
      elems[i].addEventListener('click', handler);
    }
  }
845886
def submit(self):
        
        def submit_element():
            """
            Wrapper to submit element
            """
            return self.element.submit()
        self.execute_and_handle_webelement_exceptions(submit_element, 'send keys')
        return self
836265
def send_keys_to_element(self, element, *keys_to_send):
        
        self.click(element)
        self.send_keys(*keys_to_send)
        return self
854629
def submit(label, *args)
      options = args.extract_options!
      new_class = options[:class] || "btn btn-primary"
      @template.content_tag("div",
        super(label, *(args << options.merge(:class => new_class))), :class => "form-actions")
    end
158986
function () {
        var self = this, settings = self.settings, id = self.id, suffix = self.suffix;

        function readyHandler() {
          DOM.unbind(window, 'ready', readyHandler);
          self.render();
        }

        // Page is not loaded yet, wait for it
        if (!Event.domLoaded) {
          DOM.bind(window, 'ready', readyHandler);
          return;
        }

        // Element not found, then skip initialization
        if (!self.getElement()) {
          return;
        }

        // No editable support old iOS versions etc
        if (!Env.contentEditable) {
          return;
        }

        // Hide target element early to prevent content flashing
        if (!settings.inline) {
          self.orgVisibility = self.getElement().style.visibility;
          self.getElement().style.visibility = 'hidden';
        } else {
          self.inline = true;
        }

        var form = self.getElement().form || DOM.getParent(id, 'form');
        if (form) {
          self.formElement = form;

          // Add hidden input for non input elements inside form elements
          if (settings.hidden_input && !/TEXTAREA|INPUT/i.test(self.getElement().nodeName)) {
            DOM.insertAfter(DOM.create('input', { type: 'hidden', name: id }), id);
            self.hasHiddenInput = true;
          }

          // Pass submit/reset from form to editor instance
          self.formEventDelegate = function (e) {
            self.fire(e.type, e);
          };

          DOM.bind(form, 'submit reset', self.formEventDelegate);

          // Reset contents in editor when the form is reset
          self.on('reset', function () {
            self.setContent(self.startContent, { format: 'raw' });
          });

          // Check page uses id="submit" or name="submit" for it's submit button
          if (settings.submit_patch && !form.submit.nodeType && !form.submit.length && !form._mceOldSubmit) {
            form._mceOldSubmit = form.submit;
            form.submit = function () {
              self.editorManager.triggerSave();
              self.setDirty(false);

              return form._mceOldSubmit(form);
            };
          }
        }

        /**
         * Window manager reference, use this to open new windows and dialogs.
         *
         * @property windowManager
         * @type tinymce.WindowManager
         * @example
         * // Shows an alert message
         * tinymce.activeEditor.windowManager.alert('Hello world!');
         *
         * // Opens a new dialog with the file.htm file and the size 320x240
         * // It also adds a custom parameter this can be retrieved by using tinyMCEPopup.getWindowArg inside the dialog.
         * tinymce.activeEditor.windowManager.open({
         *    url: 'file.htm',
         *    width: 320,
         *    height: 240
         * }, {
         *    custom_param: 1
         * });
         */
        self.windowManager = new WindowManager(self);

        /**
         * Notification manager reference, use this to open new windows and dialogs.
         *
         * @property notificationManager
         * @type tinymce.NotificationManager
         * @example
         * // Shows a notification info message.
         * tinymce.activeEditor.notificationManager.open({text: 'Hello world!', type: 'info'});
         */
        self.notificationManager = new NotificationManager(self);

        if (settings.encoding == 'xml') {
          self.on('GetContent', function (e) {
            if (e.save) {
              e.content = DOM.encode(e.content);
            }
          });
        }

        if (settings.add_form_submit_trigger) {
          self.on('submit', function () {
            if (self.initialized) {
              self.save();
            }
          });
        }

        if (settings.add_unload_trigger) {
          self._beforeUnload = function () {
            if (self.initialized && !self.destroyed && !self.isHidden()) {
              self.save({ format: 'raw', no_events: true, set_dirty: false });
            }
          };

          self.editorManager.on('BeforeUnload', self._beforeUnload);
        }

        // Load scripts
        function loadScripts() {
          var scriptLoader = ScriptLoader.ScriptLoader;

          if (settings.language && settings.language != 'en' && !settings.language_url) {
            settings.language_url = self.editorManager.baseURL + '/langs/' + settings.language + '.js';
          }

          if (settings.language_url) {
            scriptLoader.add(settings.language_url);
          }

          if (settings.theme && typeof settings.theme != "function" &&
            settings.theme.charAt(0) != '-' && !ThemeManager.urls[settings.theme]) {
            var themeUrl = settings.theme_url;

            if (themeUrl) {
              themeUrl = self.documentBaseURI.toAbsolute(themeUrl);
            } else {
              themeUrl = 'themes/' + settings.theme + '/theme' + suffix + '.js';
            }

            ThemeManager.load(settings.theme, themeUrl);
          }

          if (Tools.isArray(settings.plugins)) {
            settings.plugins = settings.plugins.join(' ');
          }

          each(settings.external_plugins, function (url, name) {
            PluginManager.load(name, url);
            settings.plugins += ' ' + name;
          });

          each(settings.plugins.split(/[ ,]/), function (plugin) {
            plugin = trim(plugin);

            if (plugin && !PluginManager.urls[plugin]) {
              if (plugin.charAt(0) == '-') {
                plugin = plugin.substr(1, plugin.length);

                var dependencies = PluginManager.dependencies(plugin);

                each(dependencies, function (dep) {
                  var defaultSettings = {
                    prefix: 'plugins/',
                    resource: dep,
                    suffix: '/plugin' + suffix + '.js'
                  };

                  dep = PluginManager.createUrl(defaultSettings, dep);
                  PluginManager.load(dep.resource, dep);
                });
              } else {
                PluginManager.load(plugin, {
                  prefix: 'plugins/',
                  resource: plugin,
                  suffix: '/plugin' + suffix + '.js'
                });
              }
            }
          });

          scriptLoader.loadQueue(function () {
            if (!self.removed) {
              self.init();
            }
          }, self, function (urls) {
            ErrorReporter.pluginLoadError(self, urls[0]);

            if (!self.removed) {
              self.init();
            }
          });
        }

        self.editorManager.add(self);
        loadScripts();
      }
559448
function tableButtonClick(e, data) {

    // Wire up the submit button click event handler
    $(data.popup).children(":button")
      .unbind("click")
      .bind("click", function(e) {

        // Get the editor
        var editor = data.editor;

        // Get the column and row count
        var $text = $(data.popup).find(":text"),
          cols = parseInt($text[0].value),
          rows = parseInt($text[1].value),
          spacing = parseInt($text[2].value),
          padding = parseInt($text[3].value),
          border = parseInt($text[4].value),
          styles = $text[5].value;

        if (parseInt(cols) < 1 || !parseInt(cols)) cols = 0;
        if (parseInt(rows) < 1 || !parseInt(rows)) rows = 0;
        if (parseInt(spacing) < 1 || !parseInt(spacing)) spacing = 0;
        if (parseInt(padding) < 1 || !parseInt(padding)) padding = 0;
        if (parseInt(border) < 1 || !parseInt(border)) border = 0;

        // Build the html
        var html;
        if (cols > 0 && rows > 0) {
          html = "<table border=" + border + " cellpadding=" + padding +
            " cellspacing=" + spacing + 
            (styles ? ' style="' + styles + '"' : "") + ">";
          for (y = 0; y < rows; y++) {
            html += "<tr>";
            for (x = 0; x < cols; x++)
              html += "<td>" + x + "," + y + "</td>";
            html += "</tr>";
          }
          html += "</table><br />";
        }

        // Insert the html
        if (html)
          editor.execCommand(data.command, html, null, data.button);

        // Reset the text, hide the popup and set focus
        $text[0].value = "4";
        $text[1].value = "4";
        $text[2].value = "2";
        $text[3].value = "2";
        $text[4].value = "1";
        $text[5].value = "";
        editor.hidePopups();
        editor.focus();

      });

    }