I want to remove the default autocomplete from all input fields of my web application using CSS only. I will put that CSS in the header of my web application to get the effect of that css on all web pages. I can't put autocomplete=off in all input fields individually. as there are more than 200 input in the application.
It is not possible since autocomplete=off is not a css attribute, but a html5 one.
Maybe you want to do it with js by setting element's attr, or just find and replace those 200 entries once and for all.
More info on autocomplete=off can be found in MDN.
It's not possible in CSS. You can achieve it by using JS.
Related
I have a angular2 component which is generating data to populate my ng2-table, but I cannot seem to put HTML tags into a cell. Instead the cell renders as such:
https://github.com/valor-software/ng2-table/issues/51
I've tried to modify the js file that is coming down as indicated as an older fix but changing the markup to the [innerHtml] angular2 element does not appear to be accepted.
It seems that others are having this problem as well, has anyone else found a solution? I'm aware that ag-grid is capable of doing this, but we need to use ng2-table as it supports bootstrap pagination which ag-grid does not appear to.
I need to disable a submit button and innerText by using angularJS,
but jquerymobile wrap the input tag in div.
If I don't want the wraping,or render the by my self,how can i do that?
Use
data-role="none"
as an attribute on that button.
There are several other methods and you can find them here or here, just look for an topic: Methods of markup enhancement prevention
How to enable textarea tags in HTMLPurifier?
I tried with:
$config->set('HTML.Allowed', 'textarea');
But it doesnt work. How to solve this problem?
textarea is not supported unless you load the Forms module. This module gets loaded if you turn on %HTML.Trusted, but this directive also turns on JavaScript and should only be used for trusted users.
I already found this existing question
Is this possible in XHTML: tags in a title-attribute?
...but it seems to be about browser-rendered title attribute.
I'm using a jQuery plugin to render the title attribute, called Tooltip by Flowplayer.
I can already tell you that the rendering of HTML tags contained in title attributes with this plugin WORKS. It shows nicely in FF3, IE7, IE8 and recent versions of Safari, Chrome and Opera.
My question is: is it "legit"?
I only found that the value of title attribute should be "text". Does it mean plain text or "string"?
Considering that most browsers display the HTML correctly with the jQuery plugin applied, would you think it's fair to put those tags, EVEN if they're not "officially" authorized ??
My answer would be to check out directly with a validator (http://validator.w3.org/). If the page is not on the web, open it in your browser and take the source code generated by jQuery and paste it in the validator's Direct Input tab.
If you want to know what is legit and what isn't, W3.org is the reference.
The W3C say on http://www.w3.org/TR/2011/WD-html5-20110525/elements.html#element-definitions
3.2.4.1 Attributes
Except where otherwise specified, attributes on HTML elements may have
any string value, including the empty string. Except where explicitly
stated, there is no restriction on what text can be specified in such
attributes.
This is a string value it is not markup (elements with or without attributes and text nodes). Firefox 19.0.2 and Chrome 25.0.1364.160 with no plugin, both display the raw string without trying to render it as markup. This I believe is the correct behaviour as an attribute is a text string not markup. So if you want to display html code it is fine (but it should really be html encoded) if you want to get a browser to render the html code without your JQuery plugin it is not going to happen. So your plugin is asking your browser to do something unnatural. Isn't there a better way to achieve the same effect?
I am trying to create a file upload field that has a little bit of style to it, but I seem to be having problems finding examples of this. I know part of the reason is that the field itself varies from browser to browser.
Any ideas how to do this? Or is there a way to do this without using a file element of a form that can be styled?
If what you mean is the text field for the file names, you can use the input[type=file] selector in the css files. For example :
input[type=file] { background-color: red; }
If what you mean is the file selection dialog box, I think it's browser/OS dependent and there's little (if any) you can do about it.
I have come up on this problem before. Unfortunately, file uploads are nearly impossible to style consistently across browsers. As of CSS 2, I think, the W3C standard specifically leaves behavior undefined--think of how many ways it would need to be implemented on different platforms. Firefox, for example, generates anonymous button and input elements inside the file upload element which only inherit some of the properties that you set on the upload element itself.
You can get some to work using, for example, Furuno's method, but know that the behavior will be spotty and differ widely across platforms/browsers.
Here's some links I found:
QuirksMode Article
One Extra Pixel Article (look for the file input styling section)
This would fit for your requirement.
If you are using jQuery, have a look at this plugin - https://github.com/ajaxray/bootstrap-file-field
This tiny plugin will display the file input field as a bootstrap button (with configurable classes) and will show selected file names (or selection errors) beautifully.
Additionally you can set various restrictions using simple data-attributes or JS settings.
e,g, data-file-types="image/jpeg,image/png" will restrict selecting file types except jpg and png images.