Faqts : Computers : Programming : Languages : JavaScript : Windows

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

1 of 4 people (25%) answered Yes
Recently 1 of 4 people (25%) answered Yes

Entry

How do I show the result of a dropdown in a pop-up screen? This will then drive another dropdown, results will be shown in the original screen.

Apr 1st, 2003 23:05
carsten dfgb, http://www.wingnut.nl


lets say you have some form elements on the parent. you want to press a 
button to get a popup with the value of that element.
here's how i did it. (the simplest version)
function doPreview(){
var valueName = document.getElementById('name').value
//gets the value of the formelement 'name'
newWindow = window.open('preview.htm','preview','width=450,height=300');
//opens a new window
newWindow.document.write("<html><body>this is the value of 
name:<br>"+valueName+"</body></html>");
//(over)writes the html of preview.htm
}