Questions tagged as 'javascript'

1
answer

Add text in a certain position of the input text

I have an input text, I need to click a button to add a specific word in the place where the cursor is positioned, that is, I have to get the cursor position in the input and add a word there. Can anyone help me?     
asked by 02.08.2016 / 19:04
3
answers

Show or Hide Input according to Radio Button Selected

Hello, I have an html where I want to hide or display some fields according to the button radio selected. But it has not worked, I would like some help. Here is the code: <script> $( document ).ready(function() { $("#inpu...
asked by 04.08.2016 / 17:45
1
answer

Convert handle null variable using the length property in Javascript

I'm creating an application where a question has come up. In this application there may at some point be a variable where the value of it should be an empty string ( ) but, as I am forced to work with another team where I do not have full knowle...
asked by 06.08.2016 / 03:51
3
answers

Assign dynamic value to a variable in Jquery

I searched a lot and could not find the answer. I need to assign a value to a variable in Jquery, I do not have much knowledge. What I need is: When you click on a link: <a href="?sts=Pendente" title="Avisos Pendentes" id="Pendente" d...
asked by 13.04.2016 / 01:38
1
answer

How to create relationship between different data to perform an action?

This statement returns me the state acronym: SC $("#billing\:city").val(dados.uf); I have a select so I can not change: <select id="billing:region_id" name="billing[region_id]"> <option value="">Por favor, selecione o e...
asked by 12.04.2016 / 16:27
1
answer

Send one of the values of select and paste in an input text?

How to send the value of one of the options of a "select" to an input text?     
asked by 13.05.2016 / 23:29
3
answers

Each does not work

I want to give a replace in the tag <a> by <span> . I tried to do this, but it does not work: $(document).ready(function() { $('#lista-noticias .box-noticia .conteudo-noticia').each(function() { alert...
asked by 10.05.2016 / 16:35
1
answer

Problem in form in modal bootstrap [closed]

Is there any modal constraint for bootstrap? When I put the form inside the modal, I do not get the Ajax alert, but if I take the form from within the modal, the data passes and I get the alert. When I put the form inside the modal I also get on...
asked by 13.05.2016 / 18:31
1
answer

Focus on the last line of div with scroll

I have a% div of% with attribute chat-history . Through jQuery I insert information into the database and then refresh to display in the overflow-y:scroll div. I need to update the div via Ajax request, it will focus on the last lin...
asked by 12.04.2016 / 07:57
1
answer

Popup in PHP after returning Success

I have a simple contact form and I would like the person to send the message, if it succeeds, a popup appears saying the message was sent. How could I do this? To help, I'll add part of the code PHP here: [..] $header = implode...
asked by 11.04.2016 / 16:36