Questions tagged as 'javascript'

4
answers

How do I generate a summary or excerpt of each post?

I am wanting to build a php and javascript post system, I already know the admin will write the post, post the subject, category the date goes automatic and inserted in the database. This part I already know how to do, but wanted to know how I c...
asked by 28.04.2015 / 02:19
1
answer

Add characters before each number

I have a string in a textarea that will look like this: 2199998888 2188889999 2455556666 2566665555 That is, phone numbers with break line to separate them within the textarea. I need to enter the country code on all phone numbers. I...
asked by 14.04.2015 / 16:02
2
answers

Generate random number with current date and time value with Javascript

I would like to know how to generate a random number, based on the current date and time value, using Javascript. I could not get a real example to show here, because I really do not know how to do it.     
asked by 02.05.2015 / 02:48
2
answers

How to know what is the class name of a javascript object?

In PHP we can find out from which instance an object comes through the function get_class . So: $ao = new ArrayObject; get_class($ao); // ArrayObject And in the javascript? How can we do this? Example: var f = new FormData();...
asked by 01.10.2015 / 18:46
2
answers

Mathematical account with exact accuracy returns different value in JavaScript [duplicate]

I have the following math operation, and the worst thing is, this operation handles monetary values. 3898.95 / 3.0 If you do this operation on the calculator the result will be equal to: 1299,65 exact. But with JavaScript the re...
asked by 22.09.2015 / 18:54
4
answers

How to change the link in the mobile version?

Hello, I have two links that when they are in the desktop version show a link, but in the mobile version it shows another. I would like to know how can I make a javascript to change when it is on a certain platform? link 1 link 2     
asked by 02.10.2015 / 15:29
2
answers

Which alternative to replace ASP code with JavaScript?

I have this code in asp and javascript . <%if trim(ind_tipo_proposta_pj) = "S" then%> var onum_seq_proposta_pj_ts = eval(txt_chamada + txt_prefixo + '<%Response.Write prefixo%><%Response.Write nome_c...
asked by 13.08.2015 / 21:54
1
answer

JavaScript does not recognize number 10

I have a problem that I do not know how to solve. In this code below it does the following .... according to a drop down with values from 0 to 10 being that the selected option is less than 8 it shows a hidden div, if larger form does nothin...
asked by 16.08.2015 / 04:23
3
answers

Select by default the "Cancel" in the alert

As everyone knows, the JS Confirmation will show a alert with the text entered and the CANCEL and OK strong>. And right away, OK is always selected and this in turn disturbs (in my case at least). Is it possible to keep the CANCEL se...
asked by 05.11.2014 / 11:59
1
answer

Increment and decrease value with slider

How can I create a price list? similar to this . Is there a JavaScript / jQuery plugin to implement these functions, so that I can customize it?     
asked by 08.07.2014 / 06:08