I'm trying to write a function that allows a contenteditable div to do some auto formatting while the user is typing in the div. So far I only manage to make it work in IE. Anyone can help me?
function formatOnKeyUp(){
if (window.getSelection) {
// ???????
} else if (document.selection) {
cursorPos=document.selec...
Ok so my problem is this im trying to get a Pixel collision.
When im using getImageData in a single function call it works.
But if im using Setinterval its like getImageData becomes a Break.
The code after getImageData essent being compiled anymore.
Why is this happening??
If I do this its works:
checkCollision();
function checkCollisi...
Hey All,
I am looking for a list of web browsers that fully support using ContentEditable. I know that I.E has supported it since 5 or 5.5, but what about other browsers. I know that the modern versions of Chrome, Flock, Maxthon, Opera and I.E support it. But I don't care about the modern browsers. What about the older versions of them,...
I'm using border-image with a PNG image that has a transparent section. The issue is that the div has background-color set the black. When I apply border-radius, the transparent section of the pattern shows the black of the div and not the background of the element containing the div.
How do I get border-radius to ignore the color of th...
Hi,
i currently use the client side database on an html5 iphone webapp.
In my code i need to check if a row is present in the local DB :
function isStarted(oDB) {
var ret = null;
oDB.query(sql,params,function(transaction,result) {
if(result.rows.length > 0 ) {
ret = true;
} else {
ret = false;
}
});
ret...
I am learning ways of manipulating HTML 5 Canvas, and decided to write a simple game, scroller arcade, for better comprehension. It is still at very beginning of development, and rendering a background (a moving star field), I encountered little, yet annoying issue - some of the stars are blinking, while moving. Here's the code I used:
...
A lot of examples demonstrate multiple source tags nested in the audio tag, as a method to overcome codec compatibility across different browsers. Something like this -
<audio controls="controls">
<source src="song.ogg" type="audio/ogg" />
<source src="song.mp3" type="audio/mpeg" />
Your browser does not support the audio element....
The "old" HTML/XHTML standards have a DTD (Document Type Definition) defined for them:
HTML 4.01 http://www.w3.org/TR/html401/sgml/dtd.html
XHTML 1.0 http://www.w3.org/TR/xhtml1/dtds.html#a_dtd_XHTML-1.0-Strict
This DTDs specify the rules for nesting elements - "which types of elements may appear in which types of elements". I made a...
If there is no DTD or schema to validate the H5 document against, how are we supposed to do document validation? And by document validation, I mean "how are we supposed to ensure our html5 documents are both syntactically accurate and structurally sound?" Please help! This is going to become a huge problem for our industry if we have no ...
Hi Everyone,
I am attempting to make a web browser object in C# which support html5 as good as Safari or Chrome. My main goal is for playing video, or supporting the video tag. So far i have got WebKit.Net working and playing html5 video off w3schools website, but this only works when quicktime is installed; and i really hate that rout...
Hi,
I have read a range of articles on advantages/disadvantages of Microsoft Silverlight framework in comparisson to Flash.
Fact that there were two version of Silverlight in the past 18 months worries me, as well as the fact that over 97% of web browsers already have Flash pre-installed.
I'm a .NET developer and I'm very happy with ...
HTML5 gives us some new input elements to play with, such as <input type=number>. This renders (in Chrome) as a textbox with two cycle buttons inside the textbox, for incrementing and decrementing the numeric value inside the box.
For a personal hobby project, I'm using this control. However, I'm stuck with one issue:
Is there a way to...
I'm using VideoJs to handle my HTML5 video needs, using a single M4V. I needed a playlist, and I'm able to change it's source easily using JS (in my case, jQuery).
However, I'm not able to pass these changes along to the flash fallback (which is achieved via an object including flowplayer).
Any ideas on how one might be able to dynamic...
The Silverlight strategy has shifted to Windows Phone, and for cross-platform web development, it's HTML 5.
http://www.zdnet.com/blog/microsoft/microsoft-our-strategy-with-silverlight-has-shifted/7834
I'm just starting to get comfortable with the idea of developing desktop line-of-business apps with Silverlight out-of-browser (over WPF...
I've encountered a strange problem - application is rapidly slowing down as it runs. Only thing that springs to mind is a memory leak, but how to detect it in javascript? Are there any tools?
Anyway, here's the code:
function draw_ship(){
//Body
var sbpaint = ctx.createLinearGradient(shipx+20,shipy,shipx+20,shipy+15);//painting ...
I have an ASP.Net MVC site that I want to render some custom HTML 5 canvasses in. I am getting a strange issue with the server serving up extra characters that are not in the source code.
In order to use an HTML 5 canvas in IE 8 you have to add the following tag in the html head:
<!--[if IE]><script src="../../Scripts/excanvas.js"></sc...
Hello.
Using SQLite in HTML5, how do I execute a call such as the following so that it's returned immediately, instead of passing off the result to another function?
try {
mydb.transaction( function(transaction) {
transaction.executeSql(
'SELECT name FROM celebs order by name limit 100 ',
[],
...
I want to be able to draw a fitted rectangle around text labels (person's full name). The margin isn't terribly important, but I can't just draw fixed-sized rectangles because the labels vary in lengths. How do I do this?
Here's the code that draws the text labels:
var ctx = document.getElementById('map').getContext('2d');
for (i=0; i ...