Questions tagged as 'javascript'

1
answer

How to assign function to an Array of Objects?

I have this php function returning this String: function retornaGeoCod(){ for($i = 0; $i < 2; $i++){ echo '{ "lat":"-19.4746845", "long":"-44.159503", "local":"Prudente de Morais"},'; }...
asked by 30.11.2016 / 11:14
1
answer

How do I not select select an option already selected in another select?

How to make select not allow that the option "Lider" is not duplicate , because in my business rule only one user can be a leader . I thought of the following: Assuming I have 3 selects. If I select one of them as LEADER , and select...
asked by 29.11.2016 / 18:12
1
answer

How to transform the text of a div into rows with p

Suppose you have a div , and you have huge text in it, and you would like each line to be transformed into <p> . How would it work? What I really want is, at the beginning of each line of the div that has >...
asked by 01.02.2016 / 18:00
2
answers

Add an "active" class to the link according to the page accessed?

I'm setting up a theme for WordPress , and I need to add an active class in anchors , it works as follows: I retrieve the URI from the current page and compare it to the text / value contained within the anchor that is automatically fe...
asked by 28.01.2016 / 18:48
3
answers

How to put a submenu in a menu I already have?

I'm editing the blog, and I wanted to make a menu with submenus, but I do not know exactly what makes it happen. I tried searching google but I did not get anything. Only css tutorials appear, but nothing specific that can tell me what css code...
asked by 02.02.2016 / 10:48
2
answers

Enable function on another page after clicking on anchor

Basic example, when you click on div1 of Pagina1 open Pagina2 and change the background color, is it possible? Page1.html <body> <div> <a href="Pagina2.html#div1" class="">div1</a> <a href=...
asked by 28.01.2016 / 00:48
1
answer

Clear field after X time

I have the form below, which after 2 minutes it updates the entire page: Withthecommandbelow:<metaHTTP-EQUIV="refresh" CONTENT="120;URL=http://pcn-sig.peccin.local/cracha"> And with this it resets the form on each access: <body...
asked by 27.01.2016 / 17:06
1
answer

How to identify the type of request sent to the server?

I do not want my ajax.php page to display anything when accessed by the user's browser. AJAX.PHP<?$nome=$_POST['nome'];$email=$_POST['email'];$senha=$_POST['senha'];if(!$nome){echo'Escrevaseunome!';}else{if(!$email){echo'Escrevaseuemail!'...
asked by 23.07.2015 / 20:08
1
answer

Index and automatic values

I have the following Json: {"result":[ [ {"ID_CTE":"1","ABREV":"301CAGSP","MODELO":"CT","NUMLANCTO":" 71","NUMCONHEC":" 5911","NUMFATURA":"0000173","NUMREMET":"23.643.315\/0094-51","NUMDESTIN":"23.643.315\/0110-06","NUMRED...
asked by 28.07.2015 / 20:43
1
answer

Hide part of a text with javascript

I have a table that is populated with data coming from a bank. One of the columns contains text that is sometimes long (more than 1000 characters). I want to limit the display of this text in the table to 300 characters and add a "read more" but...
asked by 15.06.2016 / 16:55