We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
i am running above html in C drive of my windows laptop
so paste below data file saved as .php or .js?
how to point that local path ?
if both html and .php same location it should automatically pick right?
slightwv (䄆 Netminder)
You need to set up your computer as a web server. You cannot just copy php/aspx/jsp/??? code and run it without the correct web server that knows how to interpret the corresponding files.
The code you posted is just the HTML file with the JSON javascript. You need to find the json_demo_db_post.php file on the w3schools website. Then it gets back to what I posted above: You need a PHP web server before you can run it.
If you don't want to run PHP and want to run some other web server, you'll need to port the json_demo_db_post.php into whatever language your web server handles.
For Windows it is IIS as your web server and typically .Net code.
https://www.w3schools.com/js/js_json_stringify.asp
>>what is dbparam
It holds the string value that will eventually be passed in to json_demo_db_post.php:
xmlhttp.send("x=" + dbParam);