Questions tagged as 'javascript'

1
answer

Add caption on a Map by the googlemaps API

Is there any way to add captions directly through the googlemaps API or do you need to put the external caption to the map, in the documentation I found no example of how to do it? Caption I say is for example:    Yellow-Means a value of 10 R...
asked by 07.04.2015 / 03:00
2
answers

JQuery how to set a value in a field with CPF mask?

I have an input using an example CPF mask: $("#cpfDependente").mask('000.000.000-00'); and I'm trying to set a value in the input this way $("#cpfDependente").val(dependente.cpf); It correctly directs the problem is that the masca...
asked by 16.11.2015 / 20:35
2
answers

How to adapt this login system in JavaScript?

I need to create a simple internal login system to apply to a blog. I can not make my code work at all, and I need help. This is the Code: <script language="JavaScript"> function Login(){ var done=0; var usuario=document.lo...
asked by 07.04.2015 / 13:30
4
answers

How do I set a value in an input tag from another site?

How could I do to pass a value to a <input> field from another site? In practice, I would like that when the user clicks on a link, button, and so on. (eg www.google.com) and in a given field a value that I have on my site appear...
asked by 03.04.2015 / 04:02
1
answer

Transform a function from JavaScript to PHP

I'm trying to pass a function written in javasript to php, but I think I made a mistake in the translation of some command and I can not find the error. Function in JavaScript: <script> function dec(string) {// retorna a mat...
asked by 04.04.2015 / 01:22
1
answer

Array / Lua table for JavaScript

I have an array in the Lua language, and wanted to pass its elements to an array JavaScript. Example of array Moon: tabela_y = {0, 1, 2} In PHP there is the implode, I do not know if it is possible in Lua.     
asked by 18.03.2015 / 16:27
2
answers

Display alert made in html and css by javascript

Good morning, I'm creating a form in html and javascript for validation, my idea is to create a successful alert or crash with html and css (cute and etc), but I do not know how I can "call" give a require on that alert that I created, help me?...
asked by 12.03.2015 / 14:43
1
answer

Change according to page

Hello. I need the logo of the site to change according to the page that the user visits. I have a site made in PHP in which the top is include . So I thought about changing the logo via Javascript. I set ID="logo" to img a...
asked by 08.03.2015 / 19:46
1
answer

Reconnect Websocket after connection loss

I use this code to connect to my server with WebSockets : (function(nameSpace) { function createMethod(method, options, stateCallback) { var that = this; this[method] = function() { if (stateCallback && stateCallback.a...
asked by 20.03.2015 / 23:01
1
answer

How to get the name of the parent object of the Javascript property

I have the following code: var teste = 'objeto': { version: '5.x.x', name:this[??] // 'objeto' }; What could be done so that the name property has the same name as the object to which it belongs (which...
asked by 09.03.2015 / 20:54