fip04
05-05-2004, 07:42 AM
Hi,
consider the following code
var sel_1 = document.form1.sel;
var txt_1 = sel_1.options[sel_1.selectedIndex].text;
var opt_1 = sel_1.options[sel_1.selectedIndex].value;
var sel_2 = document.form1.sel2;
var txt_2 = sel_2.options[sel_2.selectedIndex].text;
var opt_2 = sel_2.options[sel_2.selectedIndex].value;
var theStr = "<choice>\n";
theStr += "<pic> " + opt_1 + " </pic>\n";
theStr += "<tex> " + opt_2 + " </tex>\n";
theStr += "</choice>";
alert(theStr);
In the above code, instead of using the alert box, i need to use a new window and the tags should be displayed in the new window. i went through some tutorials on windows in JS but was not of much help.
can u help me out by mentioning some sort of pseudo-code?
thanks in advance
consider the following code
var sel_1 = document.form1.sel;
var txt_1 = sel_1.options[sel_1.selectedIndex].text;
var opt_1 = sel_1.options[sel_1.selectedIndex].value;
var sel_2 = document.form1.sel2;
var txt_2 = sel_2.options[sel_2.selectedIndex].text;
var opt_2 = sel_2.options[sel_2.selectedIndex].value;
var theStr = "<choice>\n";
theStr += "<pic> " + opt_1 + " </pic>\n";
theStr += "<tex> " + opt_2 + " </tex>\n";
theStr += "</choice>";
alert(theStr);
In the above code, instead of using the alert box, i need to use a new window and the tags should be displayed in the new window. i went through some tutorials on windows in JS but was not of much help.
can u help me out by mentioning some sort of pseudo-code?
thanks in advance