Questions tagged as 'javascript'

2
answers

JavaScript XMLHttpRequest Scope Function

function getMensages(){ var xhr = new XMLHttpRequest(); xhr.open('GET', '../mensagens.php'); xhr.send(); xhr.onload=function(){ if (xhr.readyState==4 && xhr.status==200){ jsonText = xhr.responseText;...
asked by 25.02.2015 / 03:56
1
answer

Fill table with DB data

I'm having a problem adding the designation of an article through the code. I have the following: HTML <table class="table table-striped table-bordered" id="vendaTabela" width="100%" > <thead> <tr> <th dat...
asked by 26.02.2015 / 17:58
1
answer

How to save data temporarily with good practices?

I have only one page where all the scripts are, when a user clicks on a certain data, it would redirect it to a specific script and I had to save this data (which he clicked) to be able to put in a case he wanted to edit this data later. To d...
asked by 24.02.2015 / 12:43
2
answers

How to open a page in a new tab without leaving the current page

What I want is something that works like target="_blank" , but I do not want to leave the page where the link was clicked. That is, clicking on the link would seemingly nothing change, keeping the current page view, however, a new tab w...
asked by 15.11.2014 / 00:34
1
answer

Error: Expected a conditional expression and instead saw an assignment

I am "debugging" my jQuery codes and I came across this error in the following line while(match = regex.exec(item)) { [...] error Expected a conditional expression and instead saw an assignment.     
asked by 28.11.2014 / 22:06
1
answer

setTimeout Do not Wait Time

I have this Code: <html> <form method="POST"> <textarea name="txt" value="" rows="5" cols="100"></textarea> <br></br> <input type="button" name="" value="Message" onClick="btfu...
asked by 01.12.2014 / 23:50
2
answers

Jquery or pure JS + CSS3?

The CSS3 has gained so many utilities that previously were only possible with programming, for example: Media queries, fb, keyframe, transition etc ... So what are the advantages, disadvantages and when should I use?     
asked by 29.11.2014 / 03:26
1
answer

Allow value to be repeated in JS

In the following section, it is verified if the value already exists inside the vector, if it does not exist it is inserted. I wish I could do this normal check, but allow the '0' to be repeated. Ex: v_patr = [1,2,3,0,4,5,0]; //onde só o '0'...
asked by 28.10.2014 / 12:21
1
answer

Instantiate a standard global function to call functions

I would like to know how I can create a global variable (or global element, I do not know how to call it) like in several plugins I see. Jquery example where to call any function related to it I just have to instantiate the symbol # or ca...
asked by 31.10.2014 / 19:24
3
answers

Create mask for fields

I am developing a system and in it I need to create mask for some fields, the problem that this system was started in a somewhat old version, I can not say for sure what it is but I will be posting some code to see if You can help me. I have...
asked by 28.11.2014 / 13:40