Hi all
I've been stumped over this for days and days now. I have an array in php that I want to perform calculations on via the user clicking radio buttons in a table. The results should be shown instantly on the page. The radio buttons have several values associated with them (in the php array) that will be used in the calculations when the button is clicked.
I've read about hiding the array as a document object so that js can get to it, which I've no experience of doing yet, and I've seen ways of passing the whole array to javascript and then back before the page is submitted, which apparently isn't straightforward. I don't have the experience to say which, if any, of these will work.
In summary (just in case I've baffled everyone ), I'm trying to display results of instant calculations on values in a php array following the click of a radio button. What's the best method out there for this?
Any help is very much appreciated. This has driven me more nuts than anything I've done so far. I may go mad soon and I'll take u all with me.
Thanks, Steve
I've been stumped over this for days and days now. I have an array in php that I want to perform calculations on via the user clicking radio buttons in a table. The results should be shown instantly on the page. The radio buttons have several values associated with them (in the php array) that will be used in the calculations when the button is clicked.
I've read about hiding the array as a document object so that js can get to it, which I've no experience of doing yet, and I've seen ways of passing the whole array to javascript and then back before the page is submitted, which apparently isn't straightforward. I don't have the experience to say which, if any, of these will work.
In summary (just in case I've baffled everyone ), I'm trying to display results of instant calculations on values in a php array following the click of a radio button. What's the best method out there for this?
Any help is very much appreciated. This has driven me more nuts than anything I've done so far. I may go mad soon and I'll take u all with me.
Thanks, Steve