Questions tagged as 'javascript'

2
answers

Run code inside the event listener

Hello! How do I run a code within event listener programatically? Example: document.getElementById("voltar").addEventListener('click', function() { alert("teste"); }, true); I want to execute alert of addEventListe...
asked by 03.11.2017 / 19:42
1
answer

How to do a POST in Javascript [duplicate]

I need to do a java script to execute a direct POST in the browser console. Based on this, I wanted to do this: Used sites: link link link Request URL:http://csgobounty.com/v1/tips/send?token=877e556c058a396c3f9d9eb12c7ab04b015e2...
asked by 03.11.2017 / 23:02
2
answers

How to put page title according to a product using JS?

My problem is in trying to put information in the title, in the description or swap the page image by java script. I am trying to make a shopping page (e-commerce) with angular and on the product page I would like to modify the title, descriptio...
asked by 10.10.2017 / 21:49
1
answer

Function within function [duplicate]

These days, I asked a question here in SOpt and the guy answered me with a code, creating a function within another function , something simple, but I did not use it, and I started to implement it. function QuantosEmEstoqueAbrir(){ $j('...
asked by 11.10.2017 / 19:52
1
answer

Express return post

Good afternoon, I have a problem with the POST return in express, I wanted to make a user registry using the following code: router.post('/user', (req,res,next) =>{ var obj = {name:req.body.des_name, email:req.body.des...
asked by 11.10.2017 / 20:02
2
answers

Add button, insert input value into the form itself

I have a PHP form for registering recipes (for food). By filling out this form, it is registered in a MySQL database. <form method="POST"> <input type="text" id="receita"> <input type="text" id="ingrediente"><button id="ad...
asked by 11.10.2017 / 13:11
1
answer

Capture the value of the selected item in selectOneRadio with JavaScript

I have this component Primefaces: <p:selectOneRadio id="mercado" styleClass="teste"> <f:selectItem itemLabel="Interno" itemValue="I"/> <f:selectItem itemLabel="Externo" itemValue="E"/> </p:selectOneRadio> I t...
asked by 29.11.2017 / 01:52
1
answer

Using ChartsJS

All beauty? Well, I need a strength in the Lib of ChartJS, I need to put the values inside a Stacked Groups, something like this: You can see that we have 2 values, and above we have the total. I did some research I found some things...
asked by 29.11.2017 / 13:25
1
answer

"Play / Pause" button - How to restart playback?

I made a simple "play / pause" button for audio, with the following script: <audio id="myAudio" src="http://www.sousound.com/music/healing/healing_01.mp3"preload="auto"> </audio> <script type="text/javascript" charset=...
asked by 29.11.2017 / 13:29
2
answers

Fixed menu after scrolling

I want to make the menu stay fixed after some scrolling, <script> $("document").ready(function($){ var nav = $('.menu-topo'); $(window).scroll(function () { if ($(this).scrollTop() > 150) {...
asked by 09.11.2017 / 19:49