Jump to content

Search the Community

Showing results for tags 'function call'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 2 results

  1. Hello, I'm having issues trying to set up custom input number arrows, I'm currently learning JavaScript so I'm not really sure what I'm missing, here is my code. HTML <div class="orden"> <label for="pase por dia">Boletos deseados: </label> <div class="caja_ticket"> <input type="number" min="0" id="test" size="3" placeholder="0" class="ticket"> <div class="botones_ticket"> <input type="button" id="pase_dia_mas" value="+"> <input type="button" id="pase_dia_menos" value="-"> </div> </div> </div> JavaScript I have 3 input with the id = test so to save some code I decided to use a querySelectorAll('#test') to get an array of them, and then when I click the button I want to call the function "mas1" var test = document.querySelectorAll('#test'); var paseDiaMas = document.querySelector('#pase_dia_mas'); paseDiaMas.addEventListener('click', mas1(event, 0)); function mas1(event, e) { event.preventDefault(); let test_value = e; test[test_value].stepUp(1); console.log('it works'); } however when I try to pass the values it doesn't works, if I remove the variables "test_value" and "e" and add a fixed value like "test[0]" it works: I also wonder why when I remove the event.preventDefault() function it runs once when I open the page even if I don't click at the button.
  2. Hi, see atachment for code, sorry, can't past anything here and can't include Pictures ==> web site error??? I tried to call a function from a button onclick. Nothing happens. After invoking the Debugger with F12 I get the message, that the function myView isn't declared ???? I can see this function. With best regards Gerhard JsonViewer.html
×
×
  • Create New...