I would like to know how to access an element within another element through the id using pure JavaScript.
Currently I use getElementsByTagName('a') but as in my project I will have several elements of the same type, it will not be usu...
I created a table, where I put the user's registration on a card for printing; so this table has several records (5 per page) and for each page I access a record in the same table I made an array_push with values ->
$sql = mysql_query("SELECT...
When I'm developing a front-end for a website, I put the name of the selector directly, for example .seletor1 , .seletor2 , and so on.
I recently had to work on the classes of a plugin I downloaded, and I saw that it contained:...
In php, when I want to generate a array formatted, I use the array_map function.
So:
$numeros = range(1, 10);
array_map(function ($value) {
return sprintf('%04', $value);
}, $numeros);
Return:
array('0001', '0002', '...
I'm creating an API as I said, and I need to use Authorization: Basic KEY to send login and password via header. Unfortunately I have no concept
header('Authorization: Basic dXNlcjpwYXNzd29yZA==');
This code I have to send and in...
Can you declare a variable in PHP and then use it in JavaScript?
Example:
<?
var w_qtd_v = 0;
?>
<script language="javascript">
w_qtd_v = w_qtd_v + 1;
</script>
I'm working on a C # application that needs a queue of items of type Pedido . Basically whenever a new request is created it is queued and the application shows the requests in sequential order that must be delivered. When a request is fin...
My situation : I have a masked input like this: 0,0000 % . However, to be able to validate as a wish, I need to use a replace , changing the comma by point, removing the % and then treating the value this way: 0.0000 ....
I'm not a hacker, but I know some techniques. I'm training security and I was really thoughtful about it. Every time I inject a script, it is a alert() , nothing dangerous for the host (for example). I do not have a website, there is no wa...