I’m trying to make a little JScript popup that displays information from the form for confirmation. Here is what it looks like right now:
<input type="submit" value="Accept" onclick="return confirm('Press OK to confirm your purchase of' document.form.field.value)" />
The idea is to return a more useful confirmation than just ‘Click OK to confirm’ by showing values of the submitted form in the popup. Can anyone help me with the syntax?’
You can use the following:
Or you could modify the above to loop through each product and build a dynamic string with each product on a new line like this:
Also I think the onclick event should be in the onsubmit event of the form.