Hi,
Sorry for the vague title, but I have 2 javascript functions that display the value that was set on one of the options in a form selection box. Now I want to add a third function that will sum the values from the user's selections by pressing a button.
The code from the first part is this:
So in a div with id value1 and a div with id value 2 the values from the user's selection will appear. No I'm trying to get a function to sum both values by clicking a button.Code:<script type="text/javascript"> window.onload=function(a,b) { value=document.getElementById('value1'), combobox=document.getElementById('1'); combobox.onchange=function(a) { document.getElementById('value1').innerHTML = "€ " +this.value; var r = this.value; } value2=document.getElementById('value2'), combobox2=document.getElementById('2'); combobox2.onchange=function(b) { document.getElementById('value2').innerHTML = "€ " +this.value; var q = this.value; } } </script>
Whatever I try, nothing seems to work. Any help would be highly appreciated. Many thanks in advance!
Jerry


Reply With Quote

Bookmarks