Questions tagged as 'javascript'

1
answer

Change form javascript / php function to div

Personal how do I change the function below? I want to display the time in a div. <HTML> <HEAD> <TITLE>cronometro</TITLE> <script language="JavaScript"> <!-- function showtime() { setTimeout("showtime()...
asked by 17.07.2018 / 15:56
2
answers

Date range

I am using the HTML date type 5, for the user to provide a date. <input type="date" name="data-inicial"> <input type="date" name="data-final"> There are two fields: Start date and End date, but the end date must be at most 29 da...
asked by 23.07.2018 / 18:26
2
answers

Limit the number of uses of a function

Hello, I'm creating a mini-rpg in javascript and I'm having a question in the character-building section, I'd like to know how to limit the number of uses of a function. var personagem = new Object; personagem.carisma = 1; personagem.fo...
asked by 17.07.2018 / 21:14
2
answers

How to use cookies in javascript

I create cookies in JavaScript, but I do not know how to apply them to some project. Could anyone post an example of how to use cookies?     
asked by 06.01.2018 / 19:24
2
answers

How to monitor changes in the database without making abusive queries

I have a code that accesses the database every second and returns me the number of rows in a table, the problem is that an abusive number of requests and queries are made in the database to monitor changes in the rows, I need of something that m...
asked by 10.01.2018 / 01:38
1
answer

Resize for elements and not browser window

Help me with a quick question. The jquery resize identifies when the browser window changes and triggers an event. So good. But is there any way for me to know when an element changes? When to resize it? In this case, resize does not he...
asked by 12.01.2018 / 20:50
1
answer

Convert string to JavaScript source code [duplicate]

For example, if I have a string variable that stores ', how can I run it or convert it to source code?     
asked by 03.01.2018 / 16:50
2
answers

Problem in the hyperlink for linking to phone numbers

I have a field inside a table, where the phone backs up from the database, in a format string (xxx) xxxx-xxxx . I want the moment I click on the phone, open the option to choose which program I will use to make the call. (for example skype...
asked by 11.01.2018 / 17:12
1
answer

Retrieving item in another function with jquery / js

How can I save an item via jquery to be used later? I have the following structure, where I retrieve the item from an onclick event of a button, retrieve the row of the table to which that button is associated, and display the information for...
asked by 28.12.2017 / 15:06
1
answer

Toggle button, button class

I'm trying to make a toggle button, but I have a problem the button I want needs a class to stylize in css. button class="button button1">Shadow Button</button , but the toggle button code I got uses a type on the button button oncli...
asked by 28.12.2017 / 14:36