Tips & Tutorials – Javascript

HTML CSS Javascript PHP MySQL To Build A Website (Simple Example)

Welcome to a beginner’s tutorial and simple example of how to use HTML, CSS, Javascript, PHP, and MySQL together to build a website. Just started with web development, and wondering how we can “put” all the different technologies together? Various technologies and languages work together to create a website, each of them handling a different …

HTML CSS Javascript PHP MySQL To Build A Website (Simple Example) Read More »

5 Ways To Call PHP File From Javascript (Simple Examples)

Welcome to a tutorial on how to call a PHP file from Javascript. So you need to call a PHP script to do some processing from Javascript? The common ways to call a PHP script with Javascript are: Use AJAX to call a PHP script. Use the Fetch API to call a PHP script. Redirect …

5 Ways To Call PHP File From Javascript (Simple Examples) Read More »

Simple Autocomplete In Pure HTML JS (Free Download)

Welcome to a tutorial on how to create an autocomplete with pure HTML, CSS, and Javascript. Yes, there are autocomplete plugins all over the Internet. But some of them require third-party frameworks and introduce a lot of loading bloat. So here it is, a sharing of mine with zero third-party libraries. Read on! ⓘ I …

Simple Autocomplete In Pure HTML JS (Free Download) Read More »

Get HTML Table Data In Javascript (Simple Examples)

Welcome to a tutorial on how to get HTML table data in Javascript. So you want to extract values from an HTML table in Javascript? One of the easiest ways to get data from an HTML table is to select all the cells and loop through them: <table id=”demo”> var cells = document.querySelectorAll(“#demo td”); for …

Get HTML Table Data In Javascript (Simple Examples) Read More »

Simple Editable HTML Table (A Quick Example)

Welcome to a tutorial on how to create an editable HTML table. Well, creating an editable table is quite literally adding a contentEditable property into the cell <td> on a double click. But it still requires quite some bits of code – Read on for an example! ⓘ I have included a zip file with …

Simple Editable HTML Table (A Quick Example) Read More »

Display CSV As Table In Javascript (Simple Examples)

Welcome to a tutorial on how to read a CSV file and display it in an HTML table with Javascript. Yes, you read that right. Modern Javascript is actually capable of reading CSV files and directly outputting them. No server-side required. Read on for the examples! ⓘ I have included a zip file with all …

Display CSV As Table In Javascript (Simple Examples) Read More »

Javascript Cross-Origins CORS Fetch (Simple Example)

Welcome to a quick tutorial and example on how to perform a cross-origin fetch request in Javascript. Are you trying to do a fetch request to a different domain? Only to be denied with a “no Access-Control-Allow-Origin header is present” error? To perform a cross-origin fetch call: On the first site, do a fetch call …

Javascript Cross-Origins CORS Fetch (Simple Example) Read More »