Posts by akm • 3,387 points
162 posts
-
0
votes2
answers94
viewsQ: When decreasing the browser window the position of the Labels is changed
I created dynamically Labels with a certain position. The problem is that when I minimize the browser its position changes. How can I fix this? //creation labels var labeltemp =…
javascriptasked akm 3,387 -
5
votes1
answer1381
viewsQ: Count string characters
I am counting the characters of a string in PHP. The content of the string is: 10,12,12,22,33. I want to percolate to print one by one and with an " n". The problem is that I use strlen, and it…
-
2
votes1
answer63
viewsQ: Label with mouse cursor
I created a label with the cursor position, I want that label to be always grabbed cm the cursor. I created this, it works, but not behind the cursor. var x = ev.clientX; var y = ev.clientY; var…
javascriptasked akm 3,387 -
3
votes4
answers1914
viewsQ: Take accent from a string
I’m getting a string by POST, and I want to take out accent and add '_'if there is white space. I used the strtr but it doesn’t work for me. if (isset($_POST['txtnome'])) { $txtnome=…
-
2
votes1
answer905
viewsQ: Get mouse coordinates for a specific element
I created a graph where I move objects with the mouse. I wanted to get the real coordinates defined in the graph. I’m just getting the x and y positions of the window coordinates. In my axis I…
javascriptasked akm 3,387 -
3
votes1
answer74
viewsQ: How to make a cursor to overlay a graph?
I would like to create a type cursor for graphic in Javascript, but not by image from css. For example like this in this chart http://bl.ocks.org/benjchristensen/2657838 but with two lines for x and…
javascriptasked akm 3,387 -
1
votes1
answer439
viewsQ: Size of the CSS cursor
it is possible to increase the size (width and height) from the CSS, for example circle { cursor:crosshair; height: 200px; }
-
-1
votes1
answer272
viewsQ: Pass dynamic SVG widgets to file
I create SVG elements (circles) with Javascript code dynamically. The problem is that I want to pass these circles to a file with extension .svg. If you create the elements in html, it would just…
-
1
votes1
answer1904
viewsQ: Print values from an array
I want to print the values of an array that are pushed every time I click on an object. The function works because Alert appears. The problem is that it does not print the values in the html…
javascriptasked akm 3,387 -
1
votes1
answer133
viewsQ: Identify SVG elements
I have this code to dynamically create SVG elements through a for, and a step number, which is the number of elements that will be created.(default equals 10). I add an id to each element. I would…
-
-1
votes1
answer304
viewsQ: Days of the week dynamically
I want to show the days of the week (Tuesday 2 December) in a table per week from the date function. That is, the table has 7 columns and starts on Sunday until Saturday. For example: <td>Dia…
-
1
votes1
answer46
viewsQ: hyperlink click condition
I want that when you click on the hyperlink for the second time another code is executed. <a href=?ordem=nom>$lib_nom</a> //ordena dados do array ASC array_multisort( $affiche_ord,…
-
1
votes3
answers242
viewsQ: Show in alphabetical order table
I want to show by afabetica the contents of a column of a table cm SQL. For example I tried this but only return me two record, while I have much more, the nombreid contains the COUNT of the…
-
1
votes1
answer571
viewsQ: Sort table by name
I have a table, which shows all the data from the Sqlite database. I wanted to sort by name all the data and present them. I have a hyperlink that calls a function to sort. The problem is it doesn’t…
-
3
votes1
answer415
viewsQ: Get value of the week that will start a month
I want to get the value of the week, in which will start a certain month. It works for the current month, but I want for the remaining months. This is the code I used to calculate, on what day is…
-
3
votes2
answers578
viewsQ: Decrement PHP variable by clicking a form button
I want to decrement a numeric variable when I press a name button btn. This is the code I tried: $month = date("m"); $mes=1; if(isset($_POST["btn"])) { $month = $month-$mes; $mes++; } The problem is…
-
1
votes1
answer795
viewsQ: Convert PHP time
I intend to convert the time I receive that comes from an input time (01:00) to the "his" format I want the result to be 010000. I used this code, it worked but notice error.…
-
0
votes2
answers77
viewsQ: Print array in a file
I’m entering data from a sqlite database into a file. I create the file with a name that the user chooses, and insert all table data. The problem is that you only insert a table row into the file,…
-
2
votes1
answer165
viewsQ: Send mail with attachment
I want to send an email by clicking on a link or hyperlink with an attachment. The file will find itself in the directory where the page is. I’m using this code Email with attachments in php Gives…
-
0
votes1
answer75
viewsQ: ICS file (Icalendar)
I’m creating an ics file, which stores the dates and data of an event. I want the file when downloading to be at the root where the page is running. And when I load the page, the file is immediately…
-
1
votes1
answer61
viewsQ: Get value from div
I want to get the value of div when I click. The problem is that it creates a div in the foreach. I want to get the id, to then pass this value to another page and use to make a SELECT in the Sqlite…
-
1
votes0
answers193
viewsQ: Show data from Sqlite table
When deleting a row from the database, when I refresh again, it does not show in a table that prints the rest of the rows, if it is deleted in the middle of the data. The problem is I have one for…
-
-1
votes1
answer73
viewsQ: Using a function value
I want to use the value within a function outside of it. I have the global variable, and as it is a variable that is never the same, it presents it. I tested it, and it only worked once with the…
-
7
votes3
answers3171
viewsQ: Read txt file for Select
I want to use a select, with the data inside a file .txt, created by me. Use a PHP function. Inside the file (select.txt) have: teste1 teste2 teste3 And the select <select name=select >…
-
4
votes1
answer135
viewsQ: Keep SVG line by always connecting two objects
I have two objects circle, that I can move with the mouse. I wanted a line between the two circles, that whenever one moves, the line is always glued. The code I have for moving objects: var dragged…
-
2
votes1
answer413
viewsQ: Move graphic SVG objects
I want to draw up a graph where I can move the dots (circle) of a Javascript line. When moving the object circle, the line is always glued to the circle. I want to play the genre of this: That is,…
-
0
votes1
answer903
viewsQ: Auto logout when browser close
I use a Sqlite database to log in to check if the user exists. What I want to do is close the session when the browser window is closed. I have a tab that logs out if it is called. $_SESSION =…
-
2
votes1
answer449
viewsQ: How to create an element in SVG dynamically?
I want to use a variable number and create multiple identical SVG objects. Just change their position and name in Javascript. As in the loop for exemplified in the pseudo-code: for(i=0;…
-
1
votes1
answer1261
viewsQ: Create vCard file (.vcf)
I want to create a vCard file in PHP. Insert values that come from an Sqlite database, and download the file.
-
0
votes1
answer75
viewsQ: Insert into CSV file
I wanted to insert the table data (Sqlite) into a CSV file. I do a query first, and I want to insert the result of that query into the CSV file. Exists in PHP the function fputcsv. I can create the…
-
-3
votes1
answer186
viewsQ: Refresh page without running PHP code again
I want to run a PHP code with the button Submit. The problem is that every time I refresh the page, the code runs again. I used this: if (isset($_POST['carregar'])) { // pedaço de código... } And…
-
0
votes3
answers575
viewsQ: Run PHP code once
I want the code to run only once, because every time I refresh it re-enter the sqlite database. Without running from a button. code: if(!file_exists($dir.$base)) { $base_hndl = new…
-
0
votes1
answer268
viewsQ: case sensitive PHP
I want a variable that is passed by POST to be case-insensitive, ie if for example the variable is "Test", be equal to "test". I know that there is in PHP strcasecmp, which does this. The problem is…
-
0
votes1
answer10772
viewsQ: Pass value by POST with select option PHP
I want to pass the name of the options by POST to another page. I used this but does not recognize the variable. echo "<form method=POST action=_search.php>"; echo "<select…
-
1
votes1
answer836
viewsQ: Import PHP CSV file
I have a CSV file with contacts. I want to import these contacts into a sqlite database. How can I read the file and insert it into the database?
-
3
votes2
answers1246
viewsQ: Count number of records in a database
I want to count the number of records in a database table. I have 3 records in my DB, but the result is always 1. I used this code: $base_hndl = new SQLite3("p.sqlite"); $select = "SELECT COUNT(*)…
-
2
votes2
answers1326
viewsQ: Know if user is connected PHP
I want a user when connected, does not let anyone connect to the system with the same login and password. That is if the admin is connected, and open another browser and open with the same admin…
-
2
votes2
answers19011
viewsQ: Change Javascript text
I want to change the text of the text tag with Javascript. <text id =txtrect x="5" y="35" font-family="Verdana" font-size="11" fill="white" > Rect </text> I tried this but it doesn’t…
javascriptasked akm 3,387 -
0
votes1
answer47
viewsQ: Knowing when I click on a div the value in the PHP table
I have the following problem. I want to get when I click on a div, a value of an array. That is, I query my table, to get the value. The problem is I always have the first value. Here is the…
-
1
votes1
answer953
viewsQ: Create iCalendar file using PHP
Wanted to create iCalendar file (extension .ics) to save and reload the file contents to a PHP calendar. Save days, events, start and end of each event, etc. What is the format of this file type,…
-
0
votes1
answer694
viewsQ: How to get the value of the textbox?
I want to get the value I’m gonna write on my textbox. All on the same page to then change a table field by the value inserted in textbox. <form method="POST" action="#"> <input type=text…
-
-2
votes1
answer290
viewsQ: Limit div html
I am printing a contents of an array into a div. The problem is that when the array has multiple data it passes to div. $titles = ""; foreach($array_resultados as $key =>$value){ $titles .=…
-
2
votes2
answers271
viewsQ: Print PHP array data
I am trying to print the data I have in the array. It works, I can see the data. My problem is that I want to print these various data inside the same div. As I have so prints only one value. And I…
-
0
votes1
answer60
viewsQ: Show PHP table data
I have a problem, I wanted to show the data of the respective table the query that is made. I can only show the two values within the for cycle. What I want is to show the data outside of the for…
-
0
votes2
answers1260
viewsQ: Changing a variable’s value with a PHP check box
When I click on the option I wanted to send by get, a value. Type something like this <form action='_cal.php?change=1' method="get"> <input type="checkbox" name="change"…
-
1
votes2
answers1563
viewsQ: Refresh a page after Submit PHP
I want to refresh my page (refresh), after clicking a button that is in a popup. This is the form of the popup page. <form method="POST" action="_cal.php" > <input type=submit value=Fechar…
-
-2
votes2
answers2913
viewsQ: Change value of a variable with PHP button
I want to change the value of this variable. $beg_j = $numjour; For this, $beg_j = $numjour-1; button: echo "<input type=button value=Change onclick=$beg_j-1>";…
-
10
votes4
answers11103
viewsQ: How to get the last days of the month in PHP
I want to get the last days of the current month. This is the code for today’s date: $datee= date("d/m/Y");
-
-1
votes1
answer1135
viewsQ: Calling PHP function on page onload
I want to call a PHP function that is in the same file. I tried this within HTML code. <?php select($dir, $base); ?> And my PHP function: function select($dir, $base){ $base_hndl = new…
-
0
votes1
answer874
viewsQ: Pass PHP variable in Javascript
I want to pass a variable that is in php, for Javascript. For example this: <?php $color = "Red"; ?> <script type="text/javascript"> var color = <?php $color ?>; alert("color: " +…