Multi-selection to create new document and print - How to import value in different window or frame

They have: 4 posts

Joined: Oct 1999

I am working on a script to generate a new document on selected item in a multimenu form.
The user will have to make one selection in 3 drop-down lists. The user will have to make one or more selection in a chexbox form in a pop-up window activated by an onclick button. Each selection need to be store in avariable and then used to create a new window with all the selected items. The question is how to import each selection in the different pop-up windows in the final window. This one will be printable.

Thank you.

They have: 5,633 posts

Joined: Jan 1970

If you could put together the HTML and post it here I will add the relevant JavaScript for you.

----------
[email protected]
http://go.to/hass

They have: 4 posts

Joined: Oct 1999

<html>

<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title>menuselect</title>
</head>

<body>
<script language="JAVASCRIPT">

var called=false;
//to make sure the function compute() is called
var T_Price=0;
var pr_flag;
//flag for menu1
var pr_print="";

var sp_flag;
//flag for menu2
var sp_print;

var ram_flag;
//flag for menu3
var ram_print;

var hdrive_flag;
//flag for menu4
var hdrive_print;

var vram_flag;
//flag for menu5
var vram_print;

var fdrive_flag;
//flag for menu6
var fdrive_print;

function compute(form){
called=true;
if (form.menu1[0].selected){
pr_print= " ";
pr_flag=0;
}
if (form.menu1[1].selected){
pr_flag =10;
pr_print="choice1";
}
else if (form.menu1[2].selected){

pr_flag =20;

pr_print="choice2";

}
else if (form.menu1[3].selected){

pr_flag =30;

pr_print="choice3";

//-------menu2----------

same code

}
//-------menu3----------
same code
}

}

function selection1() { window.open('URL.htm','new','width=400,height=300,scrollbars=1'); }

function print(form){
if(!called){
compute(form);
}
text = ("<HEAD><TITLE>'result'</TITLE></HEAD>");
text = (text +"<BODY BGCOLOR = '#FFFFFF' ><CENTER><B><FONT SIZE = 4><FONT COLOR=BLack>Ordonnances</FONT></FONT></B>");
text= (text +"<br></CENTER>");
text=(text+"<hr>");
text=(text+"<TABLE BORDER =0><TR ValiGN=Top><TD VALIGN=Top>");
text=(text+"<B>item1:<BR>item2: <BR>item3: <BR>item4: <BR>item5: <BR>item6:");
text=(text+" <BR>item7:");
text=(text+"</B></TD><TD>")
text=(text+"<B>"+ pr_print+"<BR>"+sp_print+"<BR>"+ mn_print+"<BR>"+ hdrive_print+"<BR>");
text=(text+ fdrive_print);

text=(text+"<TD></TR></TABLE><hr>");
text=(text+"<B><FONT COLOR=BLACK>Total Cost:</FONT>"+"       $"+T_Price);
text=(text+"<BR><BR><BR><BR><BR><FONT SIZE=-1><FONT COLOR=black>to print choose file and print</FONT>");
text=(text+"</body></html>");
msgWindow=window.open("","displayWindow","toolbar=no,width=375,height=480, directories=no,status=yes,scrollbars=yes,resize=no,menubar=yes")
msgWindow.document.write(text)
msgWindow.document.close()
}

</script>

<h2 align="center"><font color="#8080FF">Select item and create
new window with selections</font></h2>

<form method="post">
<div align="center"><center><table border="1" cellpadding="2"
border="0">
<tr>
<td><font color="#0000FF">Menu1:</font><p><font
color="#0000FF"><select name="menu1" size="1">
<option selected>Choice</option>
<option>Choice1</option>
<option>Choice2</option>
<option>Choice3</option>
</select> </font></p>
</td>
<td><font color="#0000FF">Menu2:</font><p><font
color="#0000FF"><select name="menu2" size="1">
<option selected>Choice</option>
<option>Choice1</option>
<option>Choice2</option>
<option>Choice3</option>
<option>Choice4</option>
</select> </font></p>
</td>
<td><font color="#0000FF">Menu3:</font><p><font
color="#0000FF"><select name="menu3" size="1">
<option selected>Choice</option>
<option>Choice1</option>
<option>Choice2</option>
<option>Choice3</option>
<option>Choice4</option>
</select> </font></p>
</td>
</tr>
<tr>
<td><font color="#0000FF">Menu4:</font><p><font
color="#0000FF"><input type="button" value="select"
onclick="selection1();"> </font></p>
</td>
<td><font color="#0000FF">Menu5:</font><p><font
color="#0000FF"><input type="button" value="select"
onclick="selection2();"> </font></p>
</td>
<td><font color="#0000FF">Menu6 and speed</font><p><font
color="#0000FF"><select name="fdrive" size="1">
<option>Choice</option>
<option>Choice1</option>
<option>Choice2</option>
</select> </font><input type="text" size="3"
name="speed"></p>
</td>
</tr>
</table>
</center></div><div align="center"><center><table border="1"
cellpadding="2">
<tr>
<td><font color="#0000FF"><input type="button"
name="Print_data" value="Print Preview"
onclick="print(this.form)"> </font></td>
</tr>
</table>
</center></div>
</form>
</body>
</html>

The code for the selection1() function on the next msg

They have: 4 posts

Joined: Oct 1999

<html>

<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title>FSC</title>
</head>

<body bgcolor="#FFFFFF">

<form>
<table border="0">
<tr>
<td><table border="0">
<tr>
<td><input type="checkbox" name="choice1">item1</td>
<td><input type="checkbox" name="choice4">item4</td>

</tr>
<tr>
<td><input type="checkbox" name="choice2">item2</td>
<td><input type="checkbox" name="choice5">item5</td>

</tr>
<tr>
<td><input type="checkbox" name="choice3">item3</td>
<td><input type="checkbox" name="choice6">item6</td>
</tr>
</table>
</td>
</tr>
</table>
<p align="left"><input type="button" value="done"
onclick="window.close();"> </p>
</form>
</body>
</html>

So the user will have tomake multiselection in different new window and I want all the selected items to be printable on a last new window...

Thank you for your idea.

Zeb

They have: 4 posts

Joined: Oct 1999

I'll do it. Many Thanx.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.