Questions tagged as 'javascript'

4
answers

Making a HTML list searchable

I'm trying to put a search on the page, similar to the CTRL + F of the browser. I have a list of links and this search would only point to this list. Here is a print for better understanding.     
asked by 28.01.2015 / 20:47
1
answer

Is it possible to reduce this conditional expression?

In my project I constantly come across this type of conditional expression: if(cliente && cliente.id) { return cliente.id; } else { return ''; } That is, "if there is a client and this client has an id then return the value...
asked by 02.12.2014 / 21:50
1
answer

Problem with javascript open

I'm using the following code snippet: window.open('provas-final.php','height=320, width=320', 'gl'); to open the file "proof-final.php" and in the command itself I am saying the width and height of the window that will open (320px), but whe...
asked by 17.12.2014 / 19:52
2
answers

Why match returns an object - JAVASCRIPT

I've always been one of those who understood the functions and applied, but I want to understand why: var a = "__myseld=ej232;Nome=Alexandre"; var as = a.split(";"); var x = 0; while (x<5) { alert("type of de as(sem match): "...
asked by 07.01.2015 / 13:13
4
answers

How to capture elements in a json structure using javascript

I need to get some elements inside a Javascript JSON framework. I can get unit elements like this: alert(response.paymentMethods.CREDIT_CARD.options.MASTERCARD.images.SMALL.path); alert(response.paymentMethods.CREDIT_CARD.options.VISA.images.S...
asked by 04.01.2015 / 18:54
2
answers

Test if an input of the type radiobutton is selected in PHP

I created a table that is the summary of all my previous calculations and in this table I created a field where I placed a radial input to be able to select one of the calculated options. I need to identify which of the inputs was clicked, using...
asked by 17.11.2015 / 16:48
3
answers

.serialize () only of the line marked with checkbox

I need to serialize () only on the lines selected with the checkbox <form id='form'> <table class='table table-bordered'> <thead> <tr> <th>Código</th> <th>Produto<...
asked by 26.10.2015 / 19:55
2
answers

How to access an element inside another HTML element with pure JavaScript

I would like to know how to access an element within another element through the id using pure JavaScript. Currently I use getElementsByTagName('a') but as in my project I will have several elements of the same type, it will not be usu...
asked by 26.08.2014 / 20:09
3
answers

How to use a PHP variable in javascript?

Can you declare a variable in PHP and then use it in JavaScript? Example: <? var w_qtd_v = 0; ?> <script language="javascript"> w_qtd_v = w_qtd_v + 1; </script>     
asked by 12.08.2014 / 16:41
3
answers

Doubt with Javascript Replace

My situation : I have a masked input like this: 0,0000 % . However, to be able to validate as a wish, I need to use a replace , changing the comma by point, removing the % and then treating the value this way: 0.0000 ....
asked by 11.08.2014 / 16:14