Questions tagged as 'javascript'

3
answers

What's the point of using double negation in Javascript?

Recently, while studying some code in javascript, I came across the following code: return !!navigator.userAgent.match(/iPad/i); I know that: !true == false !false == true And consequently: !!true == true !!false == false So I was...
asked by 14.08.2014 / 17:22
2
answers

Materialize CSS - fixed label on the top

How do I fix my label always on Top? Normal behavior: stays in input , when we click on input (focus) it stays on input <div class="input-field col s6"> <input placeholder="Placeholder" id="first_name" typ...
asked by 26.01.2018 / 13:17
0
answers

Communication between View and Controller through a script

I'm trying to call an Action through the .ajax that runs within a button of a Modal but apparently the url is not processed. My View looks like this: @using (Html.BeginForm()) { <div class="form-horizontal"> <h2>Resfriador</h2...
asked by 14.12.2017 / 18:43
1
answer

Redirect to one page if email is wrong and another one is right

Good evening. I need to create a form that the email can be filled with a valid e-mail and password (leads to a page) or with a name without @ and without password (leads to another page). Is it possible to do that? At the moment I have this cod...
asked by 18.01.2018 / 23:54
2
answers

Count rows with javascript

I have a script where I get all the emails of a textarea , sending them via Ajax to another page, using the split to separate the lines. However, if I have 10 emails to send the newslast every 1s it runs and sends line by line to my Ajax. S...
asked by 27.12.2017 / 09:29
1
answer

Capture a record on a table and then insert it into the bank

I am developing an order form for a workshop. I need the registered service to be linked to an already registered customer. For this I created a search form where the user can search the registered customers and select only one. No form I...
asked by 08.01.2018 / 22:02
1
answer

Function does not work with UseSubmitBehavior="False"

I have this button: <asp:Button ID="Button11" runat="server" Text="Cancelar" CssClass="btn btn-danger btn-block" OnClick="Button11_Click" OnClientClick="javascript:return confirm('Deseja cancelar toda a venda?');" UseSubmitBehavi...
asked by 08.01.2018 / 20:51
1
answer

Callback as argument return

My question is as follows, so I understand callbacks are functions passed as a parameter that will be executed when any statement is performed, but I often see callback as reserved word to return parameters to a function, such as i...
asked by 08.01.2018 / 18:59
2
answers

Select without page refresh

I use a select to access multiple sites example: city-1, city-2, city-3, when I select the city the url is: www.mysite.com/city-1. I have tried to use ajax for the URL to be fixed at: www.mysite.com, but I did not succeed. <?php switch ($_...
asked by 08.01.2018 / 01:57
1
answer

How to add value to an input when pressing a link with jquery?

I'm having the following problem: I'm not able to set the value to a input when it's inside a function . Example: $(document).on('click',".edita_cliente", function(){ var id = $(".seq").val(); $.ajax({ url: 'php/li...
asked by 14.12.2017 / 00:21