Posts by akm • 3,387 points
162 posts
-
0
votes2
answers147
viewsQ: onChange texfield javascript
have a textfield with a id and I want the moment I finish writing to perform an action onChange javascript. <input type='text' id='idNewClient' /> Part of the JS…
javascriptasked akm 3,387 -
1
votes1
answer37
viewsQ: php define path using preg_match/preg_replace?
I have a string = "/var/www*/te'st/test.php" and I want to be able to clear all the special characters to get a string like /var/www/test/test.php $string = "/var/www*/te'st/test.php"; $string =…
-
2
votes1
answer143
viewsQ: check empty input
I have an input text and want to check if the value is empty. In my example I have this: var qttDeclared = tr.getElement("input[name$='[qttDeclared]']").get("value").toInt() if(qttDeclared == "") {…
-
1
votes2
answers157
viewsQ: Regular Expression
Regular Expression for password validation. I want it to be possible at least a minuscule letter, a capital letter, at least a number and special characters (/,_,-, ... ). Example: $regex =…
-
0
votes3
answers512
viewsQ: Add option inside optgroup
I want to add a javascript inside an HTML created. <select name="testSelect"> <optgroup label="opt1"> <option value="3">Apples</option> </optgroup> <optgroup…
javascriptasked akm 3,387 -
2
votes1
answer49
viewsQ: Delete options inside optgroup
I have a select with two optgroup. I want JS to erase all options who are alone in one of the optgroup. <select id = "testSelect" name="testSelect"> <optgroup label="opt1"> <option…
javascriptasked akm 3,387 -
3
votes2
answers568
viewsQ: Tooltip CSS Transition
I want to create a tooltip (div Hover in image) with CSS and javascript, using javascript just for the style of div. I got the following example in jsfiddle I want to use transition in javascript…
-
1
votes2
answers90
viewsQ: Zoom in out mousedown
I have a SVG image, as I can create a small zoom (enlarge the image) when I step over with the mouse, and go back to its size when it came out? I have the example: http://jsfiddle.net/twsthyds/37/…
-
2
votes1
answer38
viewsQ: Upload page before call
In my following example, I have a button that calls through the window.Place a page that takes some time to load. I am trying to create a javascript code that will load the page before it is called…
javascriptasked akm 3,387 -
0
votes1
answer36
viewsQ: image moves when the scrool goes up or down
I have an image inside a table. I want this image to move when going down or up with the scoll. I’ve already used the position Fixed. My jsfiddle example: http://jsfiddle.net/3n4Df/88/…
-
5
votes3
answers3201
viewsQ: Get class name of an object
I want to get the class name of an SVG element. I have the following example, but do not get its name: class_obj = document.getElementbyId("id").className; console.log(class_obj); jsfiddle example:…
-
1
votes1
answer106
viewsQ: Remove svg object
I have the following code that creates a clone of an image. When you hear a few 3 clones, delete the last one. Without appearing. example: if (id==3){ //apagar clone/imagem } example jsfiddle:…
javascriptasked akm 3,387 -
0
votes1
answer382
viewsQ: Create popup DOM
I am creating a new page popup through the Javascript code. The page does not exist, so I want it to be just a temporary page. Example: if (option == 3){ var myPopup = window.open("", "",…
javascriptasked akm 3,387 -
2
votes3
answers441
viewsQ: Use variable more times, click Event
I have a select HTML and change the value of a variable after passing the onchange() function. The problem is I have another condition and I can’t validate. JS: //function mode select var option = 0…
-
0
votes3
answers80
viewsQ: Move the mouse, and know that I’m on top of an object
I have an image in SVG and when I have the mouse over the image make an Alert and change the cursor to the hyperlink cursor. How can I do that? <svg> <image /> </svg>…
javascriptasked akm 3,387 -
2
votes2
answers168
viewsQ: Display a label while the page is loading
I’m trying to create a label, that appears while the page is loading, with a "a carregar". And once the page is fully loaded, hide the label. My code is this::…
javascriptasked akm 3,387 -
1
votes0
answers88
viewsQ: Create PDF with 2 pages
I’m using this example: forums.mediabox.fr/wiki/tutoriaux/pao/construction_fichier_pdf to create a pdf header. The problem is that in my example I can only create a page, but I want 2 pages. I use…
-
4
votes1
answer105
viewsQ: List three-dimensional table
I have a table that I intend to print out all your values. Example: local table_2 = { ["tabela1"] = "360Mhz", "demo", "teste", ["tabela2"] = "360Mhz", "demo", "teste" } for k,v in pairs(table_2) do…
-
2
votes1
answer130
viewsQ: Get part of a string
I am going to fetch some data from a file in ics format. The problem is that the file can change several times. I have this code to put in each variable each data of a certain line in the file.…
-
1
votes4
answers1021
viewsQ: Add minutes to the hour
I have a code that adds an hour or more in the hour field, I would now like to add in minutes as well. That is, if the movement of minutes is equal to 30, add another 30 min. var decalage = +1 var…
javascriptasked akm 3,387 -
4
votes4
answers966
viewsQ: hyperlink mailto on button
I have an HTML hyperlink to send an email through the mailto: <a href="mailto:[email protected]?Subject=Hello%20again" target="_top">Send Mail</a> The problem is that in the source…
-
4
votes4
answers4345
viewsQ: Stop and restart setInterval function
I have a javascript function that starts a chronometer. I want to be able to stop, and start again (reset). example jsfiddle: http://jsfiddle.net/fk2unkb9/2/ var countms = 0; function start() { var…
javascriptasked akm 3,387 -
2
votes1
answer129
viewsQ: How to get only a part of a string from a pattern?
I have a string in Lua language. I want to get only the part of filename through the match (403.htm.en). Example: var=[[Content-Disposition: attachment; filename="403.htm.en" Content-Type:…
-
1
votes1
answer99
viewsQ: Hide text from a select
I have a select with a small image and a text in each option. I want to hide the text when I open select and when I select the option Selected. Something like this:…
javascriptasked akm 3,387 -
2
votes1
answer131
viewsQ: Send e-mail with attachment in Lua
I’m trying to send an e-mail behind the socket. I can send an email with an attachment, but I also want to add text to the email and I can’t. Example of the code: local smtp = require("socket.smtp")…
-
3
votes1
answer211
viewsQ: Send mail through Lua
I want to send a simple mail in Lua, I used the example in official documentation, and always give me back nil. Example: -- load the smtp support local smtp = require("socket.smtp") from =…
-
3
votes2
answers76
viewsQ: Is it possible to use min, max and step in CSS?
I have an input like number with a min and the max in HTML. it is possible to use this min, max and the step in the CSS? <input class=input_number id=delai type=number min=1 max=10 step=2…
-
1
votes2
answers2044
viewsQ: calculate timestamp difference between two dates
I have two dates, for example: 01/01/01 and 01/01/2002. The difference between them is one year. How can I calculate this difference and if it is more than one year make a print.
javascriptasked akm 3,387 -
5
votes2
answers232
viewsQ: Get LUA IP address
I want to get the IP address through the LUA code. I have an example code that works but I get the IP from the LAN interface. local hote, _ = socket.dns.toip(socket.dns.gethostname()) How can I get…
-
3
votes3
answers905
viewsQ: Browse in LUA tables
I have two tables created in LUA. I want to go through if there is an equal value between the two. Something like this. table1={5,10,30,40,50,60,40} table2={10,30,40} for i=1,#table1 do if…
-
2
votes1
answer380
viewsQ: Return to TEXT SVG line
I’m creating a text svg dynamically, and I want to return the middle line of the two variables when printing. I experimented with the " n" and the "br" but it doesn’t make me. var text_h_fin =…
-
4
votes3
answers78
viewsQ: Step in a for cycle
I want to put inside a array, values between -20 and 30, the part of a size that is 10. My problem is that I can put the values, but the size of the array is 11 values. max=30; min=-20; step=10;…
javascriptasked akm 3,387 -
3
votes1
answer88
viewsQ: Identify onmouseover element
I want to identify what kind of element it is by going through an element. I’m doing the following example: window.onmouseover = function(){ mouseOver(e)}; function mouseOver(e) { if (e.nodeName ===…
javascriptasked akm 3,387 -
0
votes0
answers107
viewsQ: Library with lighter script to create line charts
I have a small problem creating Chart line charts. The files cannot be external and must be local. I need to use the lightest possible library. I’ve used graphael-min.js and Chart.js and they’re too…
javascriptasked akm 3,387 -
1
votes0
answers61
viewsQ: Is it possible to use local files for that Javascript library?
I am using 3 scripts to create a Chart line graph using graphael. I used the online script. The problem is that I want to use without access to external files. <script type="text/javascript"…
javascriptasked akm 3,387 -
1
votes0
answers12
viewsQ: Zoom In graphael
I’m using the graphael to create line plots. I want to create a zoom, that is, I have the array and I want the values between -20 and 30. Since my values are between 20 and 25 on the y axis, I want…
javascriptasked akm 3,387 -
1
votes0
answers31
viewsQ: Change line segment in graph
How can I change only the first circle and the line that is connected to the other circle on a chart (line Chart)? I used the following code: lines.lines[0].attr({'stroke-width': 8}); The goal is to…
-
0
votes0
answers20
viewsQ: Hover column graphael
I’m using the graphael bookstore to draw a line chart. I want the mouse to show the two values x and y. In this case I can only show the value of y. How can I show you both? Example:…
-
2
votes1
answer145
viewsQ: Check the URL for a variable passed GET LUA
I want to check through the URL if I have any variables passed to via GET. For example at this url: www.exemplo.htm?teste=teste if url then -- se na barra de endereço tem um get return true else…
-
1
votes1
answer134
viewsQ: Timestamp without using.time()
How to convert a date and time in your timestamp, but without using the os.time() in Lua? What is the expression to calculate? Is it possible? Example: data = "01/01/2015" hora = "10:00:00"…
-
2
votes1
answer138
viewsQ: PHP implode on LUA
I have the following code that passes a php array to JS: var js_array_date1 = [<?php echo '"'.implode('","', $newarray_date1).'"' ?>]; My problem is how I can do this in LUA. Pass a LUA array…
-
4
votes2
answers340
viewsQ: Read only last characters of a LUA string
I have a string, I just want to read the last characters after the last one ";". Example: "12/5/2015;00:00:05;90" -> Read only "90"
-
1
votes1
answer119
viewsQ: PHP strips in LUA
I want to convert this PHP code into LUA language. The problem is that there is no function stripos which counts the first occurrence of the desired word in LUA. How can I convert the code below?…
-
0
votes4
answers1122
viewsQ: Align 4 Divs in CSS table
I have 4 div created, as I can line up in the center in table. That is the first line with the two div and the second line with the others. Using the CSS display table and without using an HTML…
-
2
votes1
answer87
viewsQ: Overlay a cursor on two Ivs
I call a function 2 times, to create a div and a cursor with two lines (horizontal and vertical). I wanted these two lines to work on the two dynamically created div. It’s only working on a div. var…
javascriptasked akm 3,387 -
-1
votes2
answers57
viewsQ: Center label on a dynamic div
I want to enter a label that is created dynamically in the middle of the div, in the top. Here is the example: http://jsfiddle.net/5dnr0era/…
javascriptasked akm 3,387 -
0
votes1
answer43
viewsQ: hoverColumn graphael
I’m using the library graphael.js to create a statistic chart. I want to display multiple charts on the same page with different values. My problem is in the hoverColumn, when I hover over the dots.…
javascriptasked akm 3,387 -
0
votes1
answer78
viewsQ: Graph Raphael.js error
I’m creating a line chart using the library Raphael.js. I used an example, added all the scripts and got an error in my browser: "Cannot read property 'linechart' of undefined". The example is very…
javascriptasked akm 3,387 -
0
votes1
answer200
viewsQ: Dynamically increase height and width
I have created a Javascript dynamic Ivs. I have div with auto size. The problem is that div cuts a part of the circle. How can I salvage that without pixel values. div.style.height = "auto";…
javascriptasked akm 3,387 -
0
votes0
answers85
viewsQ: Position dynamically created table with DIV
I created a table dynamically. I want to create dynamically Divs, so I can position each of the circles and captions. example: http://jsfiddle.net/tttxfvcu/17/…
javascriptasked akm 3,387