Hi,
I have a line in a javascript program where I set an onchange event to activate another javascript function...
document.getElementById("value_somefield").onchange = function() {myfunction();};
This works fine however I want to pass that javascript function a text string:
document.getElementById("value_somefield").onchange = function() {myfunction("the string to pass");};
The string needs to change depending on context.
The issue is that the function() {myfunction();}; part of the code is not a text string so I don't seem to be able to manipulate it prior to setting the onchange event.
Any suggestions?