Questions tagged as 'javascript'

1
answer

Regex, if the variable contains a certain character

I have a link by exexplo: <a href="#sessao">Sessão</a> And another link: <a href="https://...">Link Externo</a> I would like to know how, I believe by regular expression, a way to test if my link contains "#", s...
asked by 15.07.2016 / 22:48
1
answer

Move Images with Javascript

I would like an example of how you could move an HTML image using JavaScript. For example, the image is in a position, when touching a button it moves. Thanks!     
asked by 05.07.2016 / 17:28
3
answers

How to animate an anchor call?

The links are inside a div and the buttons that call them are outside this div, everything is working, I would just like to put an animation in this transition. P.S. The transition is horizontal. <style type="text/css"> html, bo...
asked by 28.06.2016 / 22:01
1
answer

Call a wordpress page in PHP page [closed]

I tried using the following command to go to a wordpress page, but it did not work. echo '<meta HTTP-EQUIV='Refresh' CONTENT='0;URL=$buscahttp>'; <script>location.href = 'http://www.xxx/¨'.$buscahttp</script>'); header('Loca...
asked by 12.07.2016 / 20:25
2
answers

Mobile Form

I would like to know how I do a form validation so that I do not leave the fields blank on my cell phones, I already did several modes, the pc works but the cell phone did not work anyway, how would I do it? <script language="JavaScript">...
asked by 29.06.2016 / 01:07
2
answers

Onclick with Javascript denial

Today I have an onclick on the id #menu , whenever I click on #menu it does a certain action, I need to create an action that everything other than #menu does a certain action. How do I do that? Is there a: !ação in ja...
asked by 14.05.2016 / 17:47
1
answer

When I click button 2 it is the time of button 1 that starts!

I have a code in java script that does the following when I click on one of the buttons if it starts a count of 60 seconds, the problem is that I have 2 buttons, the 1 button and the 2 button and when I click the 2 button it's time for button 1...
asked by 12.06.2016 / 21:47
3
answers

Change window.location.href does not redirect to new page

The if is working but window.location is not going to google is just an example but I think it explains the error. function eliminaParagem (){ var confirma =confirm("Tem a certeza que quer eliminar a paragem"); if (confirma==tru...
asked by 19.05.2016 / 15:55
2
answers

How to reload grid without having to check if it exists JS JQuery

The system was built with modal and it is possible that there is a modal there in the 2nd level that needs to update two grids below (one in the main screen and another in the modal in the 1st level), but not always this modal is called from the...
asked by 28.10.2016 / 14:37
1
answer

How do I set an attribute by its name contained in a variable?

For example var attr = 'background'; elemento.style.attr = 'blue'; The problem is that when I pass the second line statement, JS understands that I search for the attribute " attr " in style of elemento , when what I wan...
asked by 17.03.2017 / 03:57