Thanks, Adam!
There is a reason for no errors appear on the page:
[23:08:47.559] The Web Console logging API (console.log, console.info, console.warn, console.error) has been disabled by a script on this page.
How to enable it again?
The scripts.js cause an error visible under Web Console when the code is altered and in the Net log the pnameunit.php is listed when user select the product.
With Inspect tool I find that the hidden field has the name:
td#_unit__data.data_frozen
The updated script still don't work and no errors appeared:
// scripts.js
function pname_change(event) {
// obtain selected value
// use Ajax.Request and pass selected value as parameter to some php file, onSuccess update value of hidden field and display text
new Ajax.Request("modules/Premium/Orders/pnameunit.php", {
method: "post",
parameters:{
product_name: $('_product_name__data')
},
onSuccess:function(t) {
$('_unit__data').value = t.responseText;
}
});
}
Best regards!
Tavi