I installed a new fresh windows 8.1 (64bit) and then install Firefox 33.1.1 without any add-on or extensions after that. but Firefox show every numeric input (type="number") as NAN even without any JavaScript code. (other browser haven't any problem with that.)
for example code below show as this:
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
<body>
<form method="post" action="">
<input type="number" />
</form>
</body>
</html>
this is a bug in Firefox!
i think this problem exists for the Persian language (or maybe arabic)
To fix this problem in windows, set Decimal Symbol to Dot "."
Note: Region > Additional Setting
But in my opinion, now is the best solution use type="text" instead of type"number" for inputs
I see It`s happening in Firefox only when settings of Windows in Control Panel --> Language --> Change date, time, or number formats --> Format is set to Persian
(I have Win 8.1 + FireFox 39.0-fa)
Your meta tag is inappropriate for HTML5. There is a specific META Charset tag for HTML5. See http://www.w3schools.com/tags/att_meta_charset.asp
In HTML you must not use XML closing tags />
You can also help yourself by adding more content to your HTML, such as adding an encytpye to the form and more:
<form method="post" action="" enctype="multipart/form-data">
<input type="number" name="larry" min="0" max="100" value="">
</form>
Try that syntax and see if it corrects.
Related
Is it possible to use the same ckeditor that TYPO3 (8.7.11) uses in the frontend too?
I have to implement a user form with an editor and I want the frontend user to see exactly the result that is displayed in the backend - so I need to use the same editor.
Is there a way to use the same editor without installing the ckeditor plugin a second time? Maybe any functions to easily include it or something?
If you have already configured the CK-Editor it should be only a matter of creating something like this in your Template:
<html lang="en">
<head>
<meta charset="utf-8">
<title>A Simple Page with CKEditor</title>
<!-- Make sure the path to CKEditor is correct. -->
<script src="../ckeditor.js"></script>
</head>
<body>
<form>
<textarea name="editor1" id="editor1" rows="10" cols="80">
This is my textarea to be replaced with CKEditor.
</textarea>
<script>
// Replace the <textarea id="editor1"> with a CKEditor
// instance, using default configuration.
CKEDITOR.replace( 'editor1' );
</script>
</form>
</body>
</html>
The ckeditor.js should be inside your Typo3-source-folder under:
typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/ckeditor.js
The code-example is taken from the CKEditor 4 Dokumentation which can be found here:
https://ckeditor.com/docs/ckeditor4/latest/guide/index.html
EDIT:
After testing this Code myself, I noticed that this does not work since the Typo3-Installation of CKEditor is missing the style.js-file which includes the
style-definition.
I downloaded the standard version of CKEditor from here:
https://ckeditor.com/ckeditor-4/download/
And inserted the style.js-file (located at the root level of the folder) in the same directory my ckeditor.js is located.
After adding the file, including this Code:
<script src="/typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/ckeditor.js"></script>
<form>
<textarea name="editor1" id="editor1" rows="10" cols="80">
This is my textarea to be replaced with CKEditor.
</textarea>
<script>
// Replace the <textarea id="editor1"> with a CKEditor
// instance, using default configuration.
CKEDITOR.replace( 'editor1' );
</script>
</form>
inside of any Template shoud add the ck-editor.
Suppose I wanted to have Apple VoiceOver read out the contents of a webpage running in a browser, including responses to interactions, and ultimately output the result as audio.
For example, for a web page with HTML such as the following:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<label for="name">Name</label>
<input id="name" type="text" />
<button type="submit">Submit</button>
</body>
</html>
I want to write an audio stream, say, in a Wave file, in which VoiceOver says something like:
Name, edit text. You are currently on a text field inside of web content... etc...
Would this be possible programmatically? E.g. by calling some API method?
I am using the CKEditor on my website to take input from users. When HTML code is copied from page and pasted into CKEditor, it is converted into the corresponding page. I mean When I insert this:
<html>
<head>
<title>Upload Image</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div>
<form action="Upload02" method="post" enctype="multipart/form-data">
Image<input type="file" name="image" id="image" accept="image/jpg">
<input type="submit" value="submit">
</form>
</div>
</body>
</html>
It is converted into this:
I reported this issue to the CKEditor official website, but I got no help from them. I am using the CKEditor 4.5.8 full version. It is working properly in their demo, but not in the actual implementation. It is giving a problem only in copy-paste. In normal typing it's working properly. What can I do?
I have an Umbraco 5 MVC3 project where i discovered that there where white spaces here and there. When investigating i discovered that my HTML looked really bad when "viewing generated source" in firefox web developer tool. For example it removes my doctype declaration and moves my meta-tags and stuff out of the head. Simplified code:
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>#ViewBag.Title</title>
<link rel="stylesheet" href="#Url.Content("~/Content/Styles/style.css")"/>
</head>
<body id="" class="default">
<div id="wrapper">
<header id="banner" class="body">
<a class="ir logo" href="/"><h1>Christian </h1></a>
<ul class="share">
<li id="facebook"><a class="ir" href="http://www.facebook.com/sharer.php?u=#Request.Url.AbsoluteUri">Facebook</a></li>
<li id="twitter"><a class="ir" href="http://twitter.com/share?text=Christian">Twitter</a></li>
</ul>
#Html.Partial("nav")
</header>
<section id="content" class="body">
#RenderBody()
</section>
</div>
<script src="#Url.Content("~/Scripts/plugins.js")"></script>
<script src="#Url.Content("~/Scripts/script.js")"></script>
</body>
</html>
And the output begins like this
<html class="no-js" lang="en"><head></head><body id="" class="default">
If you want to check on the HTML generated by your server, you should use View source (CTRL + U).
Generated source is more like a reconstruction of the HTML based on the DOM and includes for example nodes created on the client side with javascript, once the page is loaded.
Alright, i solved it. Took me a while. After Marapet suggested not to use "generated source" i tried normal "view source" in a bunch of browsers and got different results in all of them. When i tried to validate my source i got some weird complaints:
Non-space characters found without seeing a doctype first. Expected <!DOCTYPE html>.
Element head is missing a required instance of child element title.
And my personal favourite
Cannot recover after last error. Any further errors will be ignored.
Looked like there was something up with the doctype. Opened up notepad and pasted in there to "wash" the code from metadata, the way i do sometimes when pasting stuff in to tinyMCE. The text got formatted weird even in notepad. The doctype declaration had a smaller font size then the rest of the html.
So i opened it in notepad++ too and there i got a bunch of questionmarks in front of the declaration. I removed them and copied it back in to Visual Studio, saved and now everything works.
I think the reason i got this problem was that i copied snippets directly from the HTML5 Boilerplate on github.
// Sherlock
How can I change the messages of HTML5 (or doses it change according to browser's language automatically?)
For example:
<!DOCTYPE HTML>
<html>
<body>
<form action="demo_form.asp" method="get">
E-mail: <input type="email" name="user_email" /><br />
<input type="submit" />
</form>
</body>
</html>
When I run this code (from W3schools) at Opera and write a non valid e-mail address it says
Please enter a valid email address
How can I change it to another language instead of English or change the warning to what I want?
Well there are different options.
You can disable the form validation of the form (or the field) with formnovalidate and provide a custom error message with javascript (and serverside ofcourse).
You can use javascript and use the .setCustomValidity() method to provide a (custom) error message but it is intended to add extra rules to the field.
You can use x-moz-errormessage to set a custom errormessage. But using this you need to know that this is not a standard.
There are no built-in internationalisation solutions currently in HTML(5) and all proposals seem dead. However you may find the Passive Localisation JavaScript library of some use. Online demonstration can be found here.