Jump to content

Search the Community

Showing results for tags 'html javascript'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


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

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Found 3 results

  1. Hi. I have tried to evolve on the beautiful script: https://www.w3schools.com/howto/howto_js_todolist.asp Lets say it's a shopping list. How do I add static buttons, preferrably in a left column, so when I click Milk, Milk will appear on the list. I like that I can write what's needed in the textfield, but I like an option to click buttons, instead of writing eg. Sugar, Milk, Potatoes etc. Then I could have a list of buttons to the left, where I can click the buttons, and add text to list. And if possible, it would be awesome to click a button, and copy all in the list to clipboard, ort present the list in a new window or iframe. I have tried to re-use the html part, but adding buttons instead, with value of eg. "Sugar" but it keep saying I need to write something, and when I do, it still won't add Sugar to the list. What am I doing wrong? Can someone help me out? My understanding in Java is very very limited, css somewhat ok and html better. Still cannot work this thing out. I thank you in advance.
  2. Hello I am new to HTML and javascript. I would like to get the number of files of an directory as an var in javascript. For example: If I have an folder called "C:\Users\media" and I know there are only 10 images in that folder I want the code so that I can have a variable representing the number 10(also this is subject to change like I can add images and then there will be let's say 11 images in the folder and if the pages reload the variable must contain the number 11). The closest I have come to a solution is this: <input type="file" id="file" multiple /> . However I don't want to select the files I want the files(number of files more specifically) to be automatically updated to a variable instead of select an file and then writing JS to get the length. The only solution I want must be in HTML,javascript,CSS. If you want to provide a solution using something else(lets say PHP or something I don't know...) please don't. Thank you so much PS. I apologize if this topic is in the wrong section on the forums,I want a JS solution so I posted here Also like I said I am pretty new(learning my self) so if you provide a kind of complex solutions then please just comment in why you used whatever you used.
  3. Hello I am trying to use an <input ..... /> tag and javascript to get user input and then alert() the user input. However doesn't matter what I do I either get either nothing,"undefined" or "null"? Here is an example of what exactly I am trying to do( if you run this in w3Schools TryIt editor then the alert box will show nothing) : <!DOCTYPE html> <html> <body> <p>Click the button to demonstrate line-breaks in an alert box.</p> <input type=text" id="txt" placeholder="Enter" /> <button onclick="myFunction()">Try it</button> <script> var x = document.getElementById("txt").value; function myFunction() { alert(x); } </script> </body> </html> Any help will be appreciated . I would also like to know why this is reacting like this as I fount solutions exactly like this on the internet but it seems not work at all.
  • Create New...