<script type="text/javascript">
function test() {
var customer = document.docNameSuggestor.customer.value;
var project = document.docNameSuggestor.project.value;
var doc_type = document.docNameSuggestor.doc_type.value;
var string='<table border="1" cellpadding="1" cellspacing="1"><tr>'
+ '<td><p>Suggested filename is: ' + customer + '_' + project + '_' + doc_type + '.<extension>' + '</p></td>'
+ '</tr>'
+ '<tr>'
+ '<td><p>Suggested storage path is: ...\\' + customer + '\\' + project + '\\' + doc_type + '</p></td>'
+ '</tr></table>';
document.getElementById("fileName").innerHTML= string;
}
</script>
<form name="docNameSuggestor" >
<td width="60%">
<p>Which customer is this document for?</p>
<select name="customer" >
<option>Please select</option>
<option value="Ci">Ci</option>
<option value="VF">VF</option>
<option value="H3">H3</option>
</select>
<td width="60%">
<p>Which project is this document for?</p>
<select name="project" >
<option>Please select</option>
<option value="AX1.0">AX1.0</option>
<option value="AXP2.0">AX2.0</option>
</select>
<td width="60%">
<p>Which type of document is this?</p>
<select name="doc_type">
<option>Please select</option>
<option value="CRequirements">Requirement Spec</option>
<option value="SRequirements">Software Requirement Spec</option>
</select>
<input type="submit" name="submit" value="Submit" onClick="test()">
<form action="file.html" method="post" target="_blank"></form>
</form>
These are my codes,
Q1.How can I open results in a new window after user submit selected options?
Q2:How can I populate the specific field with choices based on what user has selected from customer drop-down
Please help. Any suggestions are appreciated.



