Posts by akm • 3,387 points
162 posts
-
1
votes1
answer1190
viewsQ: Error "Cannot read Property 'x' of Undefined" Raphael.js
I have the following error when using the browser: Uncaught Typeerror: Cannot read Property 'x' of Undefined and does not present me with anything. Using jsfiddle works perfectly and I have no…
javascriptasked akm 3,387 -
1
votes1
answer26
viewsQ: Change Cx, Cy and Circle ray Raphael.js
I used the Raphael library to create a certain chart. I want to change its position and its radius. How can I do this? Example jsfiddle: http://jsfiddle.net/tttxfvcu/6/…
javascriptasked akm 3,387 -
3
votes1
answer677
viewsQ: Transform Scale does not work with expected
I want to increase the size of a certain part of the chart when passing with the mouse (Hover). I tried Transform but it doesn’t work very well for me. example: http://jsfiddle.net/tttxfvcu/10/…
-
1
votes1
answer42
viewsQ: Add title mouse
I am using an external Raphael.js file to create a circular chart. I used this page as the source: https://jbkflex.wordpress.com/2011/07/28/creating-a-svg-pie-chart-html5/ I wanted to add a title…
javascriptasked akm 3,387 -
3
votes1
answer308
viewsQ: Convert to hexadecimal colors
I want to put inside an array, hexadecimal colors debts from a variable, so I have all different colors within the array. I have the following example, but using colors does not work: var color=[];…
-
5
votes1
answer184
viewsQ: Coloring part of an SVG circle
I’m creating a circle in SVG. With a cycle for, I want to create several lines to color a certain part of the circle, without exceeding the same (for example half of the circle.) The point x1 and y1…
-
1
votes1
answer23
viewsQ: Convert date with offset
I want to make a time shift, that is to add or subtract the time. The problem is whether the time is 24, and displacement 1, the final time will be 25. The same case for if the time is 0, and offset…
javascriptasked akm 3,387 -
2
votes2
answers110
viewsQ: Use a function several times
I created a function that creates a certain clock. The goal is to use the function to reuse several times by changing the position parameters x and y. I use the function setInterval to update every…
-
9
votes1
answer236
viewsQ: Divide circle SVG into 12 parts
I’m using an SVG circle and I want to share it with a line dynamically created into 12 parts. I can only divide into 4 parts, through its radius. I know it is possible through the sin and cos.…
-
2
votes1
answer148
viewsQ: Change SVG animation
I have an SVG animation that is a rotation. I want to change its speed through an input number (dur=variable). <svg width=400px heigth=400px> <rect ry=0 rx=0 x=100 y=100 width=50 height=50…
javascriptasked akm 3,387 -
2
votes1
answer205
viewsQ: Change SVG object color with animation
Using the animateColor tag, I wanted to change the color of an SVG object. Example jsfiddle but it doesn’t work: <svg width="500" height="650" > <rect ry=5 rx=0 x=150 y=100 width=90…
-
0
votes1
answer82
viewsQ: Limit the number of clones
With the follow-up of this project, Clone of an image, I wanted to limit the number of clones and the movement of the images for example through a variable (ex: variable = 5) When for example the 5…
-
3
votes2
answers76
viewsQ: Get width in pixels
I want to get the pixel value of a svg element that is set in %. I have the following example, but return 0. http://jsfiddle.net/n6vo8ksr/…
-
2
votes1
answer161
viewsQ: HTML table in SVG
It will be possible to create an HTML table inside the tag <svg>? I have an example, but I can’t see the objects. Example: http://jsfiddle.net/XmC2A/18/…
-
1
votes1
answer441
viewsQ: Identify the positions of objects
I have two images that I move, and I keep their position x and y in an array. I create a clone of each image, and when I stop moving (onmouseup) I save its position. I give the same id to each…
-
4
votes1
answer78
viewsQ: Move Image Browser
I’m moving an image with mouse(mouse). When I use Chrome it works perfectly. But when I use the Firefox browser, moving the image shows the ban icon on the mouse, and moving it is different. How can…
-
2
votes2
answers64
viewsQ: Clone of an image
I have the code that moves SVG images with the mouse. When I move the image, as soon as it is released, I want your clone to appear, in the position that the first one started and that it is also…
-
-2
votes2
answers176
viewsQ: Move png image
I can move an SVG object with the mouse in Javascript, I would now like to move an image of type png or svg. <svg> <image xlink:href=image.png x=0 y=0 height=20 width=20 /> </svg>…
-
1
votes1
answer191
viewsQ: Lua array/table for Javascript
I have a array in the language Lua, and wanted to pass its elements to a array Javascript. Example of array Moon: tabela_y = {0, 1, 2} In PHP there is implode, I do not know if it is possible in…
-
4
votes1
answer1541
viewsQ: Send array by GET
I’m sending by GET one array in Javascript to another page through a button calling the function. The problem is that sending is in string and not in array. I want to pass this array for the Lua…
-
3
votes2
answers4925
viewsQ: Send and receive variable to another page
I want to send a variable to another Javascript page, through the onclick button. I can send and see in the address bar its value. The problem is receiving on the second page. Example: var object=3;…
javascriptasked akm 3,387 -
3
votes1
answer320
viewsQ: Move SVG objects
I have 3 objects of type SVG rect. I want to move them with the mouse. The problem is that I can only move when I create the object dynamically in the Javascript code. If I create HTML inside SVG, I…
javascriptasked akm 3,387 -
2
votes1
answer36
viewsQ: Get SVG object id
I can get the id of an SVG object through getElementById using only one. But since I have three objects, how can I know id of each. var shape = document.getElementById('rect1'); shape.onclick =…
javascriptasked akm 3,387 -
1
votes4
answers2540
viewsQ: Checkbox that selects all
I have a list of several checkboxes, and wanted the last checkbox to be to select and de-select all others. Example: if (document.getElementById("all").checked = true){ //selecionar todas } if…
javascriptasked akm 3,387 -
0
votes1
answer76
viewsQ: Height and width SVG
I have an SVG element and I want its height and width to fit according to the resolution. For this I will get in javascript through screen.width. Now I wanted to insert this obtained value into the…
-
4
votes1
answer2519
viewsQ: Get window width and height
I wanted to get the width and height of the window, so that if my page is viewed in different resolutions, the window will be positioned. Because, with different resolutions, the page either gets…
javascriptasked akm 3,387 -
2
votes1
answer257
viewsQ: Calculate x in x seconds
I have this code that calculates in 1 second in 1 second between a certain time and then insert into a table. Instead of calculating every 1 second, how can I calculate, for example, every 5…
-
3
votes1
answer118
viewsQ: Option with CSS button type
I have a select; and, on the latter option, I call a page. As it is not possible to use a button within a select, I used the onChange. I wanted the last option was the closest thing to a button in…
-
4
votes3
answers12947
viewsQ: Onclick in a select option
I’m using a select. I want the last option call another page. <select> <option>Teste1</option> <option>Teste2</option> <option…
-
2
votes2
answers1301
viewsQ: Add input button to select
I want a button to call another page inside a select. The problem is that using this code, the button is always outside the select. <select> <option>teste</option>…
-
1
votes0
answers90
viewsQ: Use viewBox in SVG
I used SVG to create objects. The problem is that when changing the window, the SVG is cut, I can only see a part. I want to use viewBox to show all the SVG depending on the window or image…
-
6
votes1
answer263
viewsQ: Insert into an array between certain values
I have two values in time format, 20:03:02 and 20:03:35, who are in a array in Lua. hora_array={"20:03:02", "20:03:35"} The difference between the two values is 33 seconds (20:03:02 - 20:03:35 =…
-
2
votes1
answer125
viewsQ: Read LUA file
I have a file that I just want to read some lines, not all lines. I get the lines I want to read, which are numbers. I can only read the entire file. local inicio = GET["inicio"] local fim =…
-
3
votes2
answers322
viewsQ: Get the highest value of an array in Lua
I’m using Lua code and I want to get the higher value of an array. Example: tem_array = {10,2,3,20,1} I used this code below, but I get the number of elements and not the maximum: max =…
-
4
votes1
answer92
viewsQ: How to know the last weekend of a month in LUA
How to get the last weekend of the month of March to change your time to daylight saving time. Code to identify if it is the month of March and if it is a Sunday. month_now=os.date("%m")…
-
5
votes3
answers13363
viewsQ: How to validate an input?
I have a form that sends the values entered in input to another page. I want to do a validation between inputs, if a number is larger than another, and if it is not, do not go to the second page and…
-
-1
votes1
answer199
viewsQ: Dynamically create variable
I have a cycle for, and wanted to create a variable dynamically, not to repeat code again in Javascript. I used the eval, but it doesn’t work. Example: for (var y = 1; y <= 2; y++) { eval('var…
javascriptasked akm 3,387 -
1
votes1
answer209
viewsQ: Concatenate parts of variable names
I have a cycle for, and I want to create several arrays with the name different from the increment of the for. I try that, but it’s not possible. for($y=0; $y<=1; $y++){ $newarray_date.$y =…
-
0
votes3
answers1128
viewsQ: Draw characters in variable
I have a variable with the following content 00:00:01. I want to take out the two points to have the final result 000001. I use the split but the result I have is 00,00,01. var res =…
-
2
votes2
answers1143
viewsQ: Pass variable with various input/select
I have a form with several input that I create with a for cycle, I pass by POST to another page and change its name as in the example: <form action="page2.php" method="post"> <?php…
-
8
votes3
answers1220
viewsQ: Get timestamp
I have two variables, one with the date and the other with the time. How can I get your timestamp of the two variables. Example: var data = 02/01/2015; var hora = 10:00:00; var d = new Date(data +…
-
0
votes0
answers127
viewsQ: Get content from a page using Xmlhttprequest
I am using Xmlhttprequest to get content from a page. I have the code that works to create the object and send a alert. I wanted to get the contents of a page in mode assync. This is the code…
javascriptasked akm 3,387 -
0
votes1
answer66
viewsQ: Get expression value
In my javascript code I use this expression to make a calculation to get value of a graph with the mouse position (Posy). 460 is the position of my axis, and the maximum and minimum of the graph…
javascriptasked akm 3,387 -
2
votes1
answer381
viewsQ: Generate Qrcode from a file
I create PHP files, and I wanted to add a Qrcode image of each file to download it. The files are PDF and SVG.
-
0
votes1
answer44
viewsQ: Labels position is changed when window is lowered
I create dynamically Labels, and when the window has dimmed the position of the Labels change. I used the position Fixed, but still move. Example :http://jsfiddle.net/zy6nLcgL/7/ var…
javascriptasked akm 3,387 -
3
votes1
answer3636
viewsQ: Convert timestamp value to date
I have a value timestamp one-date, 1389135600, how can I convert this value to a date of this kind 27/12/2014.
-
0
votes1
answer184
viewsQ: Get max and min array
I wanted to get the maximum and minimum of an Array. The Array comes in PHP and I use Json to convert to Javascript. I used the Math.max.apply(null, js_array) but it doesn’t work for me. //convert…
javascriptasked akm 3,387 -
0
votes1
answer55
viewsQ: Table in SVG file
I create a SVG file in PHP. I wanted to write a table in the file, and then show it. I used this, but it doesn’t show the table when I open with an editing program. fwrite($hndl, "<?xml…
-
0
votes1
answer54
viewsQ: SVG rectangle inside another rectangle
I want to place a straight element inside another straight element. I used opacity, but always show me a rectangle. I used the following code: <svg width="400" height="180"> <g> <rect…
-
2
votes3
answers788
viewsQ: Get line from a file
I am reading a txt file in PHP, and I want to get the first line and the last line to write. I used this code to read the whole file line by line. But what I want is just a few lines. $fp =…