ScottInTexas
03-18-2003, 07:29 PM
How do I direct the output from the asp into the frame using a post method on a form.
<form id="choices" method="Post" action="http://h.../virtual/.../getData.asp">
<select size="1" id="crackerSelect" onchange="SelectThis()">
<option selected value="--Select Cracker--">--Select Cracker--</option>
</select>
<select size="1" id="chartstyle" onchange="SelectThis()">
<option selected value="--Select Period--">--Select Period--</option>
<option value="qtr">By Quarter</option>
<option value="month">By Month</option>
</select>
<input type="hidden" id="plant"><input type="hidden" id="period">
</form>
I will change the javascript to load the two hidden inputs and that is where I would like to put the submit. What ever is sent back by the ASP I want in the frame that is currently receiving the info at the moment.
ChartFrame.location="http://.../virtual/.../getData.asp?plant=" + strPlant + "&period=" + strPeriod;
/* Maybe I should have this?
for (i = 0; i < plant.length; i++){
if (plant.options[i].selected)
strPlant = plant.options[i].text;
}
if (strPlant =="--Select Plant--"){
ChartFrame.location='about:blank';
return;
}
period=choices.chartstyle;
for (i = 0; i < period.length; i++){
if (period.options[i].selected)
strPeriod = period.options[i].value;
}
if (strPeriod =="--Select Period--"){
ChartFrame.location='about:blank';
return;
}
ChartFrame.location=choices.submit();
Sure appreciate your help.
<form id="choices" method="Post" action="http://h.../virtual/.../getData.asp">
<select size="1" id="crackerSelect" onchange="SelectThis()">
<option selected value="--Select Cracker--">--Select Cracker--</option>
</select>
<select size="1" id="chartstyle" onchange="SelectThis()">
<option selected value="--Select Period--">--Select Period--</option>
<option value="qtr">By Quarter</option>
<option value="month">By Month</option>
</select>
<input type="hidden" id="plant"><input type="hidden" id="period">
</form>
I will change the javascript to load the two hidden inputs and that is where I would like to put the submit. What ever is sent back by the ASP I want in the frame that is currently receiving the info at the moment.
ChartFrame.location="http://.../virtual/.../getData.asp?plant=" + strPlant + "&period=" + strPeriod;
/* Maybe I should have this?
for (i = 0; i < plant.length; i++){
if (plant.options[i].selected)
strPlant = plant.options[i].text;
}
if (strPlant =="--Select Plant--"){
ChartFrame.location='about:blank';
return;
}
period=choices.chartstyle;
for (i = 0; i < period.length; i++){
if (period.options[i].selected)
strPeriod = period.options[i].value;
}
if (strPeriod =="--Select Period--"){
ChartFrame.location='about:blank';
return;
}
ChartFrame.location=choices.submit();
Sure appreciate your help.