Skip to content
Advertisement

Uncaught ReferenceError: parameter_name is not defined

Uncaught ReferenceError: province_name is not defined

I’m having this error and I don’t know why, because I have used the same steps with other methods and everything is ok. What I want to do is to pass a parameter on a onclick function in venta.php from venta.js, and when the btn is clicked the info must be added on the page.

This is the code for venta.php

JavaScript

Code for venta.js

JavaScript

Advertisement

Answer

Strings inside of functions need to be quoted. Change your code from

JavaScript

to

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement