Search Results

Search found 11621 results on 465 pages for 'html5 video'.

Page 147/465 | < Previous Page | 143 144 145 146 147 148 149 150 151 152 153 154  | Next Page >

  • single page for mobile/iphone and desktop

    - by henna
    i have developed a mobile version of a page and it uses some mobile specific java and css i have come across many solutions to point mobile/iphone users to that specific page and desktop users to original webpage. but what i want is that i get both things in one page and when user is on mobile that certain part of javascript and css run while on same page without user being redirected to other pages. is this possible

    Read the article

  • Canvas scalable arc position

    - by Amay
    http://jsfiddle.net/cs5Sg/11/ I want to do the scalable canvas. I created two circles (arcs) and one line, when you click on circle and move it, the line will follow and change position. The problem is when I added code for resize: var canvas = document.getElementById('myCanvas'), context = canvas.getContext('2d'), radius = 12, p = null, point = { p1: { x:100, y:250 }, p2: { x:400, y:100 } }, moving = false; window.addEventListener("resize", OnResizeCalled, false); function OnResizeCalled() { var gameWidth = window.innerWidth; var gameHeight = window.innerHeight; var scaleToFitX = gameWidth / 800; var scaleToFitY = gameHeight / 480; var currentScreenRatio = gameWidth / gameHeight; var optimalRatio = Math.min(scaleToFitX, scaleToFitY); if (currentScreenRatio >= 1.77 && currentScreenRatio <= 1.79) { canvas.style.width = gameWidth + "px"; canvas.style.height = gameHeight + "px"; } else { canvas.style.width = 800 * optimalRatio + "px"; canvas.style.height = 480 * optimalRatio + "px"; } } function init() { return setInterval(draw, 10); } canvas.addEventListener('mousedown', function(e) { for (p in point) { var mouseX = e.clientX - 1, mouseY = e.clientY - 1, distance = Math.sqrt(Math.pow(mouseX - point[p].x, 2) + Math.pow(mouseY - point[p].y, 2)); if (distance <= radius) { moving = p; break; } } }); canvas.addEventListener('mouseup', function(e) { moving = false; }); canvas.addEventListener('mousemove', function(e) { if(moving) { point[moving].x = e.clientX - 1; point[moving].y = e.clientY - 1; } }); function draw() { context.clearRect(0, 0, canvas.width, canvas.height); context.beginPath(); context.moveTo(point.p1.x,point.p1.y); context.lineTo(point.p2.x,point.p2.y); context.closePath(); context.fillStyle = '#8ED6FF'; context.fill(); context.stroke(); for (p in point) { context.beginPath(); context.arc(point[p].x,point[p].y,radius,0,2*Math.PI); context.fillStyle = 'red'; context.fill(); context.stroke(); } context.closePath(); } init(); The canvas is scalable, but the problem is with the points (circles). When you change the window size, they still have the same position on the canvas area, but the distance change (so the click option fails). How to fix that?

    Read the article

  • file upload using progress element in HTML 5

    - by UNNI
    I am using progress element while displaying the progress of a file upload in javascript. But the problem that I am facing is it is not completely loading huge file.when I checked evet.total attribute it gives the total size of the file in bytes.But when it loads physically event.loaded attribute loads only 70 to 75 %.So I want to know is there any pre-requisite when use progress event? Has anybody faced this kind of issue before?.Thanks in advance.

    Read the article

  • Detect what is selected (highlighted) or clicked within an element on a page?

    - by Fog Cook
    How would one go about detecting what has been selected on a page in a browser? Example: Click, hold, select 3 words and 1 image on a page, release. Sub-question: How to detect what letter someone clicked on? Without using: A span injector breaking everything up OR a WYSIWYG plugin I'm hoping this isn't just a type of browser interaction you can't detect. There could be many uses, but my goal is a simple 'live' page editor, or at least a way to know what someone is clicking on/selecting aside from just the id of an element.

    Read the article

  • How do I delete files in a class?

    - by user3682906
    I want to have a CRUD management on my gallery but I have no idea how. I have searched the internet but I did not find what I was looking for. This is my class: class Gallery { public function renderImages($map) { $images = ""; foreach (glob($map ."*.{jpeg,jpg,png,gif}", GLOB_BRACE) as $image){ $images .= "<a href='".$image."' data-lightbox='afbeelding'><img src='".$image."' class='thumbnail'></img></a>"; } return $images; } } and this is my gallery: <div class="gallery"> <center> <a href="index.php">Back:</a> <style> body { margin:0; padding:0; background:#efefef; font-family: "Helvetica Neue", helvetica, arial, sans-serif; color: black; text-align:center; /* used to center div in IE */ } </style> <?php $gallery = new Gallery(); echo $gallery -> renderImages("../images/"); $connection = new DatabaseConnection(); $render = new RenderData(); $page = 1; if(isset($_GET['page'])) { $check = new CheckData(); if($check->PageCheck($_GET['page'])) { $page = $_GET['page']; } } ?> <table> <div id="Intro"> <tr> <td>Hieronder kan je uploaden.</td> </tr> </div> <tr> <td>Max. 500000000Bytes</td> </tr> <tr> <form action="pages/upload_file.php" method="post" enctype="multipart/form-data"> <td><label for="file">Filename:</label></td> </tr> <tr> <td><input type="file" name="file" id="file"></td> </tr> <tr> <td><input type="submit" name="submit" value="Submit"></td> </tr> <tr> <td><input type="submit" name="delete" value="Delete"></td> </tr> </form> </table> How do I make a CRUD management on this? I want to select the photo and then delete it from my computer. I hope you guys can help me out...

    Read the article

  • jQuery Mobile page overrides desktop HTML div layout

    - by batjko
    I'd like to use jQuery mobile on my desktop page. I'm probably thinking of this wrongly, but I tried simply inserting a page element into an existing standard div, like this: <body> <div id="left_sidebar"> [...] </div> <div id="mylist" data-role="page"> <div data-role="listview"> [list items bla bla] </div> </div> <div id="right_sidebar"> [...] </div> <div id="site_footer"> (c) bla blub </div> </body> ...hoping that only the middle part displays the "mobile" page elements. However, that page div seems to override the entire site and turns the whole body into a mobile page (albeit displaying my listview item nicely... across the entire screen). Any idea what to do? Advice is much appreciated.

    Read the article

  • How to read loaded image into a blob?

    - by Gajus Kuizinas
    I am facing same-origin policy restrictions when loading remote images. However DOM 0 Image object can be used to load a remote resource (this is essentially the same as creating an <img /> tag). var fr = new FileReader(), img = new Image(); img.src = 'http://distilleryimage8.s3.amazonaws.com/6cf25568491a11e2af8422000a9e28e9_7.jpg'; img.onload = function () { // how to get this image as a Blob object? }; Is there a way to read this resource into a Blob/arraybuffer object? This is not a duplicate of How to convert an image object to a binary blob as the latter does not rise with same-origin issues.

    Read the article

  • Adobe edge animation fails to load first time in Opera, Crome but works in Firefox and Safari

    - by user3721777
    I have quite a serous problem here since I work on this animation for a while, I have a Adobe Edge Animation (done in CC) that fails to load the first time in Opera and Crome but does work in Firefox and Safari. It fail to load every time coming from another page. Only work if you reload. The problem persist both locally and online. It does work in preview every single time. I you can push me in the right direction, that would be great. Thanks! Here you can see the animation: http://tierraburritos.com/test/laCarta.html

    Read the article

  • Document conversion and viewing, what are the cutting edge solutions?

    - by DigitalLawyer
    Goal: building a web application where a user can: Upload a document (doc, docx, pdf, additional office formats a +) View that document in a browser, preferably in html Download the document (in doc, pdf, additional open formats a +) Current solution: Ruby on Rails Application on Rackspace Users can upload doc and pdf files (AWS) Files can be downloaded in the format in which they were uploaded Thumbnail generation ([doc, pdf] - pdf - png) is done through AbiWord. Certain doc files do not convert well. Documents can be viewed in embedded Google docs viewer (https://docs.google.com/viewer). Certain doc files cannot be displayed. Little flexibility. Potential improvements: Document viewing in pdf through pdf.js Viewing in html (+ annotation) through Crocodoc I'd be glad to hear other users' experiences, and will add good recommendations to this list.

    Read the article

  • ImageData of an externally loaded Image?

    - by sri
    I load an external image and draw it on the Canvas element like so: var canvas = document.getElementById('canvas1'); var context = canvas.getContext('2d'); var image = new Image(); image.onload = function(evt) { context.drawImage(evt.target, 0, 0); } image.src = "test.jpg"; But I want to get the ImageData. So after calling context.drawImage, I do this: var imagedata = canvas.getImageData(); manipulate(imagedata); // modifies imagedata.data context.putImageData(imagedata, 0, 0); Is that the only way to get the imageData of an externally loaded image? Drawing the image on canvas & then getting the imagedata seems awfully slow. Am I missing something? Thanks!

    Read the article

  • How do I rotate a single object on an html 5 canvas?

    - by Kappers
    I'm trying to figure out how to rotate a single object on an html 5 canvas. For example: http://screencast.com/t/NTQ5M2E3Mzct - I want each one of those cards to be rotated at a different degree. So far, all I've seen are articles and examples that demonstrate ways to rotate the entire canvas. Right now, I'm guessing I'll have to rotate the canvas, draw an image, and then rotate the canvas back to it's original position before drawing the second image. If that's the case, then just let me know! I just have a feeling that there's another way. Anyone have any idea? Thanks in advance!

    Read the article

  • using a tileset with canvas

    - by Anonymous
    Yeah so I'm lost from the get-go. Alright let's say I have a big image with every tile for a 2D top-down RPG game. They're all the same width and everything. What I don't know is how would I save every individual tile from that image to their own image data for use on the canvas? Basically I want to take a big image with all my tiles, choose squares throughout it to make images out of the tiles, and store each image as a variable in an array. So, how would I do this?

    Read the article

  • displaying the different uploaded files as thumbnails or any other way

    - by user1529342
    I have written code to upload the files of different types using php, and also i am saving their location information and date in database table. i made a query to display list of files i have uploaded...and resulting output on a html page as follows 1.uploads/clouds.png date and time 2.uploads/resume.pdf dare and time .......so on is there any different any way to display them by their file types as like an operating systems do..... or any better way.... I am curious to know it... Thanks for any help...

    Read the article

  • jquery onclick for expanding text content on the right?

    - by Jon Snow
    Hi I am trying to achieve the same effect as it is on hover on my fiddle, I would like to use jquery click/toggle to expand the content instead of seeing it on hover I am trying the basic addClass with jquery/css but somehow it's breaking off and cannot figure it out how to work properly Would appreciate any help or advice on the following, thanks a lot in advance, here is the fiddle i created with the jquery I am using $(document).ready(function(){ $(".gamewrapper").click(function(){ $(".gamewrapper").addClass("expand"); }); }); Thanks

    Read the article

  • Force download through markup or JS

    - by mschoening
    Lets assume I have a file on a CDN (Cloud Files from Rackspace) and a static html page with a link to that file. Is there any way I can force download this file (to prevent it from opening in the browser -- for mp3s for example)? We could make our server read the file and set the corresponding header to: header("Content-Type: application/force-download") but we have about 5 million downloads per month so we would rather let the CDN take care of that. Any ideas?

    Read the article

  • Website displays in chrome perfectly, but not in mozilla or IE

    - by Atharul Khan
    here are the code snippets for the html and css. It works finds in Google chrome, but when I try to display it in mozilla or IE, it shows something completely different. I cannot attach images as I do not have the required reputation. I really appreciate the help. Thank you! HTML <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <link rel="stylesheet" type="text/css" href="style.css"> <link rel="shortcut icon" href="ak.png"> <title>Home</title> </head> <body> <div class="Nav"> <nav> <ul class="navigation fade-in2"> <li><a href="#home">Home</a></li> <li><a href="#about">About</a></li> <li><a href="#portfolio">Portfolio</a></li> <li><a href="#shop">Shop</a></li> <li><a href="#blog">Blog</a></li> <li><a href="#contact">Contact</a></li> </ul> </nav> </div> <div class="logo"><a href="#home"><img class="ak fade-in2" src="ak.png"></a></div> <div class="background"><img class="beauty" src="beauty.jpg"></div> <div class="header"> <h1 class="headerName fade-in">DESIGN | DEVELOP | BRAND</h1> <h4 class="service fade-in3"><a href="#portfolio">VIEW PORTFOLIO</a></h4> <h4 class="service fade-in3"><a href="#services">VIEW SERVICES</a></h4> </div> <!--<div class="mainbody"><p>safsdaf</p></div>--> </body> </html> CSS @-webkit-keyframes fadeIn { from { opacity:0; } to { opacity:1; } } @-moz-keyframes fadeIn { from { opacity:0; } to { opacity:1; } } @keyframes fadeIn { from { opacity:0; } to { opacity:1; } } * { padding: 0; margin: 0; } li { display: inline; font-size: 15px; font-family: verdana; } nav { width: 100%; text-align: right; background-color: #222222; padding: 0; margin: 0px; line-height: 47px; position: fixed; z-index: 100; } .ak{ width: 90px; height: 55px; z-index: 101; position: fixed; background: transparent; color: transparent; background-color: transparent; } .Nav a{ text-decoration: none; padding: 15px; } .Nav a:link{ color: #A7A7A7; } .Nav a:visited{ color: #A7A7A7; } .Nav a:hover{ color: #DBDBDB; transition: all 0.3s ease-out 0s; transition-property: all; transition-duration: 0.3s; transition-timing-function: ease-out; transition-delay: 0s; } .header { background-color: rgba(0,0,0, 0.25); width: 100%; height: 626px; text-align: center; position: fixed; z-index: 10; } .background { position: fixed; z-index: 8; } .beauty { width: 100%; height: 626px; } .headerName { font-size: 2.5em; text-align: center; color: #D3D3D3; padding: 180px; padding-bottom: 50px; margin: 0px; letter-spacing: 4px; font-weight: 100; font-family: 'Lato', sans-serif; } .fade-in { opacity:0; /* make things invisible upon start */ -webkit-animation:fadeIn ease-in 1; /* call our keyframe named fadeIn, use animation ease-in and repeat it only 1 time */ -moz-animation:fadeIn ease-in 1; animation:fadeIn ease-in 1; -webkit-animation-fill-mode:forwards; /* this makes sure that after animation is done we remain at the last keyframe value (opacity: 1)*/ -moz-animation-fill-mode:forwards; animation-fill-mode:forwards; -webkit-animation-duration:1s; -moz-animation-duration:1s; animation-duration:1s; -webkit-animation-delay: 0.3s; -moz-animation-delay:0.3s; animation-delay: 0.3s; } .fade-in2 { opacity:0; /* make things invisible upon start */ -webkit-animation:fadeIn ease-in 1; /* call our keyframe named fadeIn, use animation ease-in and repeat it only 1 time */ -moz-animation:fadeIn ease-in 1; animation:fadeIn ease-in 1; -webkit-animation-fill-mode:forwards; /* this makes sure that after animation is done we remain at the last keyframe value (opacity: 1)*/ -moz-animation-fill-mode:forwards; animation-fill-mode:forwards; -webkit-animation-duration:1s; -moz-animation-duration:1s; animation-duration:1s; -webkit-animation-delay: 0.6s; -moz-animation-delay:0.6s; animation-delay: 0.6s; } .fade-in3 { opacity:0; /* make things invisible upon start */ -webkit-animation:fadeIn ease-in 1; /* call our keyframe named fadeIn, use animation ease-in and repeat it only 1 time */ -moz-animation:fadeIn ease-in 1; animation:fadeIn ease-in 1; -webkit-animation-fill-mode:forwards; /* this makes sure that after animation is done we remain at the last keyframe value (opacity: 1)*/ -moz-animation-fill-mode:forwards; animation-fill-mode:forwards; -webkit-animation-duration:1s; -moz-animation-duration:1s; animation-duration:1s; -webkit-animation-delay: 0.9s; -moz-animation-delay:0.9s; animation-delay: 0.9s; } .service{ font-size: 14px; width: 190px; text-align: center; font-family: 'Lato', sans-serif; color: #D3D3D3; border: 2px #A7A7A7 solid; border-color: rgba(255, 255, 255, 0.5); display: inline-block; border-radius: 5px; background-color: transparent; letter-spacing: 2px; } .service a{ text-decoration: none; display: block; padding: 15px 20px; } .service a:link{ color: #D3D3D3; } .service a:visited{ color: #D3D3D3; } .service a:hover{ background-color: rgba(255, 255, 255, 0.15); transition: background-color .15s ease-in; -webkit-transition: background-color .15s ease-in; -moz-transition: background-color .15s ease-in; -o-transition: background-color .15s ease-in; } UPDATE 1: I updated both browsers and it seems the css3 animations work perfectly fine on both browsers. What seems to be the problem is the positioning of the pages UPDATE 2: Here are the links to the different browser screen shots Chrome: https://www.dropbox.com/s/jlpa4vu51kdnews/Chrome.JPG InternetExplorer: https://www.dropbox.com/s/zbchs3su9ahxr0n/IE.JPG Mozilla Firefox: dropbox(.)com/s/fyalnhsha9ktadz/Mozilla.JPG (I can't post the third link because I don't have enough reputation)

    Read the article

  • How to make image's background transparency to 0?

    - by pheromix
    There are images displayed inside a HTML table in a PHP code : The code of this table is : for ($i = 0; $i < $data['list']['cnt']; $i++) { $tabRows[$i][1]['width'] = "45%"; $tabRows[$i][1]['align'] = "center"; $tabRows[$i][1]['value'] = '<img src="'.HTTP_FIGURES.$data['list'][$i]['fig_image'].'" />'; } As you can see the background of the images are seen and they make the page dirty. So I want to remove the background of each image. How to do that ?

    Read the article

  • Drawing Image onto Canvas Stretches Image?

    - by Fred Finkle
    I have this code (stolen from the web): function readIt() { var reader = new FileReader(); reader.onload = (function(e) { var img = new Image(); img.src = e.target.result; var c = document.getElementById("canvas"); var ctx = c.getContext("2d"); ctx.drawImage(img, 0, 0); } ); reader.readAsDataURL(document.getElementById('userImage').files[0]); } Which works up to a point. The canvas's width and height are set to the size of the image, but only the top left of the image appears - It appears to be stretched so it fits all the space allocated to the canvas (enough to display the whole image - 615px x 615px). If I add an <img> element sized the same size as the canvas and point the src to the image in the file system it appears perfect. I'm using Chrome, but it appears the same in Firefox. Thanks in advance.

    Read the article

  • HTML/Javascript disabled and then reenabled checkbox is being POSTED

    - by NeverStopLearning
    I have a page with a checkbox that is disabled/reenabled with javascript on button click. If I never disable the checkbox then its value is correctly POSTed, however if I disable the checkbox even once it gets posted without value (posts as "name=" even when checked). I have inspected the POST value through firebug. Why does it behaves like this? Am I missing something? I ve read somewhere that disabled controls are not posted, thats OK, but this control is not disabled when the submit is clicked. I am using ASP.NET with more complex setup to test this, but essentially this is the core of the problem. The brower is FF latest. I found very similar question, however without an answer: disabled control being reenabled but still not posting back contents to server

    Read the article

  • IE8 CSS different from IE7 & Firefox

    - by thegunner
    Hi, I'm applying a css style to a select dropdown and input textboxes. The style appears to work in IE7 and Firefox but not in IE8. The css is: input.text, input.file, textarea.textarea, select.select { font-family:"lucida grande",tahoma,verdana,arial,sans-serif; color:#333; margin:0; padding:4px; } input.text, textarea.textarea, select.select{ border-top:1px solid #7c7c7c; border-left:1px solid #c3c3c3; border-right:1px solid #c3c3c3; border-bottom:1px solid #ddd; } The style appears to apply fine to textboxed but not selects/ Any ideas about why this is happening in IE8?

    Read the article

  • Is it possible to use JSF+Facelets with HTML 4/5?

    - by Bytecode Ninja
    Facelets relies on XML namespaces to work with XHTML. How are HTML 4, and as far as I know, HTML 5 do not support namespaces. Also HTML 5 has some new elements that are not available in XHTML. Even HTML 4 and XHTML have some differences regarding elements and attributes they support. The question is: Is it possible to render HTML 4/5 documents using Facelets? If so, how?

    Read the article

< Previous Page | 143 144 145 146 147 148 149 150 151 152 153 154  | Next Page >