Questions tagged as 'javascript'

4
answers

How to show warning "Refresh your Browser" when it does not support HTML5?

How to display the "Update Your Browser" warning when the user's browser does not support HTML5 tags or CSS3 properties? An initiative that encourages this is the link site, but they do provide a script for it. Would it be possible to...
asked by 13.01.2015 / 13:08
1
answer

Lock key f5 javascript

Well, as the title itself indicates, I would like to know how to block the F5 key with Javascript.     
asked by 18.06.2015 / 07:48
4
answers

Access javascript variable in loop with model

I'm creating an Asp.Net MVC project and found a problem in View. See the code: <script> var data = []; for (var i = 0; i < '@(Model.Count())'; i++) { data[i] = { "source": '@(Model.ElementAtOrDefault(0).Source)',...
asked by 09.04.2015 / 13:56
1
answer

How do I get what's copied to the clipboard and put it in a variable? [duplicate]

It would be like this: when copying anything using CONTROL + C , I need to put that content into a variable using JavaScript. I did not find on the internet how to do this. Someone help? Detail: It is by extension. It would be for me to wri...
asked by 10.04.2015 / 03:40
2
answers

Is it possible to change class of many DIVs with a single js command?

Friends I have several DIVs in my page, each with its ID, but with the same pattern, for example "checker-001", "checker-002", and so on ... where, I use a JS to change its characteristics, for example $('#checker-363').removeClass('UmaVelhaCl...
asked by 22.03.2016 / 09:42
4
answers

How does copy objects work?

var a = {a: 1, b: 2}; var b = a; b.a = 3; In the above code, b.a becomes 3, and a.a also becomes 3. var a = {a: 1, b: 2}; function b(objeto) { objeto.a = 3; } b(a); In the above code, the value of a.a remains 1, since I am...
asked by 28.04.2016 / 19:59
1
answer

Why are not you loading this image in javascript?

I'm trying to load these three images into the document but I can not, does anyone know why it does not load? Follow the xhtml file: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict...
asked by 25.04.2016 / 07:11
1
answer

Is it safe to use the new syntactic sugar for Javascript callbacks?

These days I was testing some Javascript features in Google Chrome 50 and I noticed that it has already been added to arrow function for callbacks. So: $.each([1, 2, 3], x => x * 2); // [2, 4, 6] Formerly it would have...
asked by 24.05.2016 / 19:49
2
answers

Nodemailer sends email but recipient does not receive it (hostgator server)

I have an e-mail server on the hostgator and an account on it. I need to use nodemailer to send messages to my clients from this account. For this I need to manually configure with these instructions from the hostgator I'vetestedallpossiblec...
asked by 16.04.2016 / 19:53
2
answers

How to get the JSON return via jQuery?

I have a Click to Call link that returns me a JSON. How do I get the data generated in JSON via jQuery? Link: http://192.168.0.6:8080/G4FlexWS/rest/flexuc/clicktocall/ext/telefoneOrigem/telefoneOrigem/telefoneDestino Return in JSON:...
asked by 28.05.2014 / 14:29