VirtualMV/JavaScript/Case Study: Forms/Pop-up Window/Content

Demonstrating how form data is displayed in a pop-up window
Ok so here we'll look at two different pop-up windows: the first is a simple one that just displays an html page and the second will grab the data from the form and display.

A simple Pop-up Window


And in order for it to work we need to create an HTML page vmv_js-NewReleases.html

A Pop-up window with data from the Form
I have added comments into the code to show you what is happening.

{{vmv:Source| ");	winMsg.document.write(" Total Cost = " + intCost + " ");	winMsg.document.write(" ");  } else { alert ("error in data") } }  }}