I'm playing around with full browser canvas element it seems to spill beyond the browser bounds generating horizontal and vertical scrollbars.This is the technique I'm using: [code]I've also tried to wrap the canvas element inside a div and set that div's overflow equal to hidden, but the results are unchanged.
My application is based on client-server architecture. It is a E-Learning Application. I am using ruby on rails server, javascript,canvas,SVG element. I have an idea of an interface to allow the teacher to build any type of animation for students using Cake javascript API. I wanted to save the animation build using the canvas element on the rails server either in database or as a file. Later I have to use that animation to be played to students. Any way to do it on any language except proprietary languages like flash but from that language communication can be done with rails server.
I've coded in Java before but I'm still having some trouble. I am trying to draw a ribbon type shape on an <canvas> element and for some reason, when I turned it into a function, it seemed not to work. Here is what I have for drawing the ribbon with a function:
I feel like it has something either to do with the function definition, or the call. Before this script is executed, i create a canvas in the following way: <canvas id="navCanvas" height="200" width="120"> Why it is not displaying.
I want to delete some lines on the canvas that i have created in HTML5 (with the <canvas> tag). I know one solution and that is using clearRect() (give this function the HEIGHT and WIDTH of the canvas and you clears the whole canvas.).But i don't want to clear the whole canvas, i only want to delete a few lines made by the function lineTo().
I have a menu in which is applied typeface script. Typeface 0.11 version doesn't support hover on links. There is an experimental version but doesn't work very well for me, so i tried to implement hover by myself. Problem is: hover works pretty well changing canvas context property fillColor and then calling fill(), but the stroke on hovered voice remains on another color. Difficult to explain, so i put some test code online: TEST CODE As you can see, passing with mouse on the menu voices triggers the hover and the element change, but remains bordered in red.
IE6 in standards mode doesn't seem to hide scrollbars on the body element (overflow:hide) Ain't this a quandary. I have it in my head that I need to specify html instead. The scrollbars do hide on Gecko browsers though, so there is definitely a disagreement among browser developers on how to implement scrollbars (as a side note, Gecko browsers with their notoriously bug-ridden resize code seem to always screw up when asked to stretch and scroll divs, even when the page is reloaded on every resize!)
My first thought is to modify the CGI that generates the style sheet as I already have code that deprecates the document type when hidden scroll bars are required on IE6 (but not IE5.) This is based on the simple empirical evidence that the scroll bars are still there on IE6 in standards mode, so the optimal document type (XHTML strict) cannot be used. So I could just change this to output an html style (rather than a body style) for IE6 and lose the deprecation (it wouldn't be needed at this point.)
So the question is this. Given that CGI-based processing of browser versions for these kinds of tweaks is taboo, what would you check on the client side before dynamically generating the style for the body and/or html element? It doesn't seem like you could just send both as this would surely break some older browsers (I know you can do tricks with comments and such, but that only works for NS4 and maybe IE3 AFAIK.)
documentElement is the only thing I can think of that indicates standards mode and NS6/Mozilla support this AFAIK.
IE Conditional comments perhaps? I would hate to hard-code a test for a browser version number into the actual document (for obvious reasons), but I guess it is an alternative if the browser version is exposed to these things.
I don't see any other way to deal with a situation like this than with server-side code that looks at the browser's version number and makes the necessary adjustment. And there are lots of little differences like this that just don't seem to have viable client-only solutions. There's DirectX stuff (probably is an object detect for that) and funky colored scrollbars (hey people ask for them) and document margins (Opera did them slightly differently than the rest as I recall) and now this scrollbar thing.
I have used a textarea to display typewriter effect text. The scrollbars are displayed by default. What is the code to disable the scrollbars in a textarea form field? < scrolling="no"> does not seem to work.
<script> var newWindow = null; var scrolling = 0;// Controls whether the layer is scrollin or not var yT = 25;// Pixel position the top of the scrolling layer should be set to var lT = 25;// Initial position for the top of the layer var yI = 5;// Increment that the scrolling layer should move at var yH = 0; var domStyle;// Stores the generic DOM for the scrolling layer to access style properties var dom;// Stores the generic DOM for the scrolling layer var isDHTML = 0; var isLayers = 0; var isAll = 0; var isID = 0;
in the parent window, i have some objects that will release a pop-up window. in the pop-up window you can make various changes that will affect the database. to see those changes in the parent window, i need to refresh...right?
well, when i refresh...if you're working at the bottom of the page it pops the scrollbars all the way back up to the top. is there a way to reposition the scrollbars without the use of anchors?
Is there anyway to detect if scrollbars were made visible in a textarea? I'm not talking about initial setting of the scrolling attribute, but rather whether scrollbars have been added either horizontally or vertically based on the users text input?
I'm looking for an solution to find out the real vertical viewport - without the height of horizontal scrollbars.
I have two frames side by side. The left one declared 'scrolling="no"' and the right one 'scrolling="auto"'. For the left frame it is important to know if the right frame has a horizontal scrollbar and how sick it is. So I have tried to compare the viewport of both frames.
Using 'window.innerHeight', 'document.documentElement.clientHeight', 'document.body.clientHeight' or 'document.body.offsetWidth' I get the height including the scrollbars.
The same problem with two frames (rows="50%,50%) i've solved with block elements declared with a width of 100%. Comparing the offsetWidth of both, I can see if there is a scrollbar in one frame. But with frames side by side that doesn't work.
I was checking on jQuery plugins, but most of the scrollbar ones are using like 4 - 5 div classes just to stylize one scrollbar and most of the classes names must be specific to make it work with the plugin, is there any way to give some style to a scrollbar without doing all that coding?
How exactly does the sizing of the grid work? I have a grid that I've tried to experiment with and it seems like no matter what setting I use, there is a vertical and a horizontal scrollbar. the only thing that changes is if it stretches to fill the its container div. How do I get it to fit within a specific width and also to not display scrollbars?
I am trying to add a link to a web page which will open a new window which has no scrollbars ,toolbars,menu etc for a nice clean look(the window will display a flash image display gallery) I know you do this with javascript but am having trouble placing the javascript in the html ,what would be ideal is if someone was kind enough to give me an example of exactly how the complete page code would look with the javascript included,it need only be a very simple page with no content except the link which maybe we could just call sample.
I setup the image popup ( http://www.sitepoint.com/article/res...it-images-size) on our portfolio:www.visualdevelopments.com/portfolio but the large image I want to display the whole thing. Can I set this somehow to add scrollbars so the user can see the entire image if the image is larger then their screen size?
I'm working on a script that involves dragging an element around a page. When it is dragged so that part is out of the window, the scrollbars are activated. Is there a way to turn off this behavior?
I have a div that is filled with content dynamically and is fixed so it will always be in the same place even when you scroll. I need scrollbars to appear when the div is has too much content and goes beyond the screenborder.
I have an iFrame on which I wish to display scrollbars ONLY when the mouse is over the iFrame AND the source of the iFrame is larger than the iFrame can display I am using the following code for the iFrame but believe that I need to add some script to make it work:
I'm listening for the window.onresize event and trying to get the document.body.clientWidth afterwards to make sure a wide block fits onscreen. I'm working in Firefox and the thing is, when a scrollbar is added to the page due to content getting longer, the body.clientWidth gets smaller, but the window.onresize doesn't fire (I guess this makes sense as the window hasn't been resized per se).
I am assuming that I will have to check the body.clientWidth manually after the content gets longer and then call my resize function if so. But is there a way to achieve this or watch body.clientWidth other than window.onresize?