how can I change a form's action with prototype ? I've seen plenty of examples with jquery using:
$("#form1").attr("action","http://actionurl.com");
but haven't one with prototype. Thanks in advance.
You could use the writeAttribute method:
$('form1').writeAttribute('action', 'http://actionurl.com');
Related
I want to remove the ui-corner-tr and ui-corner-br classes from one specific spinner with an id of test and a class of testSpinner as an example.
I tried... and many combinations of classes with no luck.
$('.ui-spinner .testSpinner').removeClass('.ui-corner-tr');
$('#test').removeClass('.ui-corner-tr');
Any ideas?
It can be an order issue: maybe the jqueryUI library loads after your code, nullifying it.
(I'm just guessing... You should provide more details).
the removeClass method does not require CSS selector names, just class names.
$('.ui-spinner .testSpinner').removeClass('ui-corner-tr');
$('#test').removeClass('ui-corner-tr');
Reference: https://api.jquery.com/removeclass/
I would like to know whether there is a way to loop over all the controls in a view (or all controls under a specific control) in SAPUI5. I'm looking for an analog to the vanilla JS document.body.querySelectorAll('*') function.
The closest thing I know of would be the View class's getControlsByFieldGroupId method but that would require me to tag all elements in the view, which I'd rather not. I've looked in the API reference to no avail.
Is there some clean way to do this in SAPUI5 1.71?
Thanks in advance for your input!
Joshua Schroijen
You can try: YourViewInstance.findAggregatedObjects(true); which will return all the aggregated controls.
I should know this, but I'm drawing a complete blank...
What is this type of form called?
I don't think it has a name. It's a multiselect select element customized with a jQuery plugin
See http://www.designchemical.com/lab/jquery/demo/jquery_create_add_remove_select_list.htm
or http://quasipartikel.at/multiselect_next/
etc
Add multiple ClickHandlers to each suggestion. For example, for each suggestion I want to have 2 links 'exclude' and 'include' and add a handlers to each link.
SuggestBox let's you provide your own SuggestionDisplay if you don't like the default one.
It might be helpful to include more details in the question (I would comment but cant until i get more rep).
What type of widget/widgets are you using?
If its a suggestbox then the answer Thomas Broyer supplied should work.
To do this create a new class and extend
SuggestBox.DefaultSuggestionDisplay
We have a similar implementation at my workplace. We have a custom suggestion display class which extends SuggestBox.SuggestionDisplay. It is a PopupPanel at heart, with a VerticalPanel that holds our custom Suggestions. Those items have click handlers.
The project advanced suggest box handles this kind of needs: you can use the Table layout for example to have your buttons (see the demo)
I can disable the table button using this:
tinyMCE.activeEditor.controlManager.get('divId_table').setDisabled(true)
but what I'm interested in is actually hiding it. Any idea on how to accomplish that?
Thank you!
First, you have to use the advanced theme.
Then, add this option in the TinyMCE init code.
tinyMCE.init({
...
theme_advanced_disable : "bold, justifyleft, justifyright"
});
I hope this might help someone.
source
list of elements' name here
I'm not familiar with TinyMCE myself, but since you appear to have javascript access to the element itself, all you need to do is set it's display property to "none".
document.getElementById("theButton").style.display = "none";
incase ur trying to hide a specific button, use the following code.
$('.mce_cut').hide() //hides cut button
lookup other button titles using firebug in case u wish to hide something specific.
Incase you are looking to hide specific editor's button, modifiy the jquery selector to select correct sibling/descendent.
alternately, try this ..
tinyMCE.activeEditor.controlManager.controls.ctl00_SPWebPartManager1_g_5005db96_e035_4197_a958_75f008b35061_ctl00_tbKeywords_cut.remove()
Note that ctl00_SPWebPartManager1_g_5005db96_e035_4197_a958_75f008b35061_ctl00_tbKeywords is my asp.net control's id. Don't bother about this if ur not using Asp.net serverside textbox control. In case you are.. <% theTextBoxID.ClientID %> gets u that.
Use the following (using jQuery; a non-jQuery approch is easily built):
var elem = $(ed.id+'_'+'divId_table')
elem.addClass('mceButtonDisabled');
elem.removeClass('mceButtonEnabled');