Found 10483 Articles for Web Development

How to “enable” HTML5 elements in IE 8 that were inserted by AJAX call?

George John
Updated on 27-Jan-2020 07:26:37

312 Views

To enable HTML5 elements in IE, you need to use plugins like html5shiv. The HTML5 Shiv enables use of HTML5 sectioning elements in legacy Internet Explorer and provides basic HTML5 styling for Internet Explorer 6-9,With that, you can also use document.createElement to create an element.var demo = document.createElement("demo"); demo.innerHTML = "Working!"; document.appendChild(demo);

How to either determine SVG text box width or force line breaks after 'x' characters?

Krantik Chavan
Updated on 27-Jan-2020 07:26:08

253 Views

Use the getBBox() function and add a single word at a time to a text object. When it gets too wide, you need to add a line feed.var a = Raphael(500, 500); var b = a.text(100, 100).attr('text-anchor', 'start'); var maxWidth = 100; var content = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis nec semper mauris. Sed gravida augue feugiat nulla ultrices efficitur. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed sit amet lobortis eros, et lobortis diam. Aenean arcu velit, condimentum eu lacus in, dignissim bibendum odio. Mauris ultricies nunc et lorem ... Read More

I need a client side browser database in HTML5. What are my options?

Yaswanth Varma
Updated on 15-Dec-2022 13:21:16

454 Views

The task we are going to perform in this article is about I need a client side browser database in HTML5 what are my options. Before diving into the article let’s have a look. HTML5 introduces two mechanisms, similar to HTTP session cookies, for storing structured data on the client side. The two storages are session storage and local storage and they would be used to handle different situations. You can use local storage in HTML5 for this purpose. The Local Storage is designed for storage that spans multiple windows and lasts beyond the current session. Local Storage The Web ... Read More

How to get a key/value data set from a HTML form?

Nishtha Thakur
Updated on 25-Jun-2020 06:19:04

1K+ Views

To get a key/ value data set from a HTML form, use jQuery.Let us say this is our HTML −     For JS −var data = $('form#form1’).serializeArray(); // [{'demo: 'value'}] $.ajax({    data: data });

Which HTML5 tags are more appropriate to represent money amount

Yaswanth Varma
Updated on 15-Dec-2022 13:14:08

2K+ Views

A variable is represented by the var element. This could be a real variable in a programming or mathematical expression, an identifier for a constant, a function parameter, Depending on what you want to achieve, but it appears that your possibilities are − Use microdata, such as a product's pricing, as an example. If you want to emphasise the price without implying that it is more significant, use . If the price is crucial, such as the entire cost of an itemised receipt, use the style. If you require an element to design the pricing differently, use ... Read More

Can the HTML5 Canvas element be created from the Canvas constructor?

Yaswanth Varma
Updated on 15-Dec-2022 12:47:16

400 Views

In this article, we are going to perform can the HTML5 canvas element be created from the canvas constructor. We can achieve the task by using element in HTML. Before we dive into the examples, let’s look into the definition and usage of element in HTML. The Canvas Api useful for drawing graphics via javascript and htmlelement.It can be applied to animation, game graphics, data visualisation, photo editing, and real-time video processing, among other things. The majority of the Canvas API's attention is on 2D visuals. The WebGL API renders hardware-accelerated 2D and 3D visuals and also makes ... Read More

Render ASP.NET TextBox as HTML5 Input type “Number”

karthikeya Boyini
Updated on 25-Jun-2020 06:07:18

1K+ Views

To render ASP.NET TextBox as HTML5 input type “Number”, set type="number" directly on the textbox.Let us see an example of ASP.NET TextBox −You can also use the following dynamically created the control −TextBox tb = new TextBox(); tb.Attributes.Add("Type", "number");

How to save HTML5 canvas data to file?

George John
Updated on 27-Jan-2020 07:08:50

567 Views

Use PNGStream to save HTML5 canvas to file.var f = require('fs') , out = f.createWriteStream(__dirname + '/text.png') , stream = canvas.pngStream(); stream.on('data', function(chunk){    out.write(chunk); }); stream.on('end', function(){    console.log(‘PNG Saved successfully!’); });

Does HTML5 allow you to interact with local client files from within a web browser?

Anvi Jain
Updated on 25-Jun-2020 06:09:11

216 Views

No, HTML5 does not allow you to interact with local client files directly. You can use drag and drop or FileSystem API for this.ExampleLet us see an example of drag and drop on a web browser using HTML5 −                    #boxA, #boxB {float:left;padding:10px;margin:10px; -moz-user-select:none;}          #boxA { background-color: #6633FF; width:75px; height:75px; }          #boxB { background-color: #FF6699; width:150px; height:150px; }                      function dragStart(ev) {             ev.dataTransfer.effectAllowed='move';     ... Read More

Which browsers support the HTML5 History API?

Samual Sam
Updated on 27-Jan-2020 07:07:22

218 Views

The WebKit-based browsers and Firefox 4 mainly supports the HTML5 History API. However, now almost every modern browser supports it.Firefox 4+Google ChromeInternet Explorer 10+Safari 5+iOS 4

Advertisements