Questions tagged as 'javascript'

1
answer

Pass value from the OnkeyPress input of the button

I have an input: <input id="in_cpf_cnpj" name="cpf_cnpj" class="form-control" placeholder="Digite o CNPJ" required autofocus></> I need to send the value of it, as a parameter, to a function through the OnClick of a button, I'm...
asked by 11.06.2017 / 13:03
1
answer

Protect against HTML changes without blocking the browser console

Good morning, how do I prevent the user from inspecting the html element and modifying it? For example: I return a value for the screen and feed it into an input called itemSerial, so the user can use the quantity field to enter an amount tha...
asked by 26.05.2017 / 15:22
1
answer

How to access property with # in a JSON file with JQuery?

Hello, I'm using Last.fm's api and I'm having trouble accessing the #text that's inside the image array. Data Link - > JSON I try: console.log(values.track[index].image[index].#text); But it does not work. How can I solve?     
asked by 24.03.2017 / 17:00
1
answer

Hide / Show function does not work in IE 8

I have a JavaScript that does the function of grouping items in a table. For example I click on it and it expands bringing more values of this item. The problem is that IE 8 does not work. In Chrome and Mozilla the function works normally....
asked by 24.03.2017 / 23:55
1
answer

Bug, button disappearing when opening dialog

function pergunta() { $('#form').dialog({ resizable: false, height: 'auto', width: 400, modal: true, title: 'Criar Ticket?', buttons: {...
asked by 23.03.2017 / 20:20
1
answer

Form added to page

I have a javascript function that loads forms from XML files. The files contain only form codes, inputs, selects, etc ... This data is loaded dynamically to a page via the jquery load () function. Soon afterwards another function populates those...
asked by 28.03.2017 / 21:37
2
answers

How can I pass the function of this function to a php file called geolocation via ajax?

var x = document.getElementById("demo"); function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition); } else { x.innerHTML = "Geolocation is not supported by this browser.";...
asked by 28.03.2017 / 16:55
2
answers

function to use query data

I'm building a function that via ajax makes the query a query in the database and via json returns the result. But everything else works I can not use the json object anywhere except inside the function. I have tried to use global variable de...
asked by 27.03.2017 / 22:41
1
answer

Print separate divs but with the same id [closed]

I would like a script to print a separate div from the one that has the same id eg: <div id="print"> <p>Imprimir este conteúdo separado das outras div</p> <input type="buttom" value="Imprimir"> </div> <div id=...
asked by 09.08.2017 / 01:40
1
answer

Make code only work on Desktop [duplicate]

How do I make a code, JQuery / JavaScript only work on Desktop? That is, in mobile phones and tablets, I do not want it working ... With CSS I use Media Query, but with JavaScript I get a little lost. Thank you!     
asked by 05.05.2017 / 14:50