
November 1st, 1999, 12:06 PM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
I've created a form that accepts certain input and stores it in a
database. (That part is done.)
In one section of the form there are two fields: BRIEF_SUMMARY (text
box) and DETAIL (pull down menu).
What I would like to do is to have the "Brief Summary" text box
automatically filled with the following text "Give Space in MB" ONLY if
"Add Data Space" is selected from the DETAIL pulldown menu.
I have a java script called:
function update_brief_sum(msg,brief_summary) {
var brief_summary = " "
var msg =
document.mktdata.SelProblem.options[document.mktdata.SelProblem.Sel
ectedIndex].text
if (msg == "ADD DATA SPACE") {
document.mktdata.brief_summary.value = brief_summary;
}
}
And in my cgi script I am using the onSelect method to achive this by:
sub brief_summary{
print "<TD align=left bgcolor="#FFA074"><FONT SIZE=2><B>Brief
Summary</B></td>
n";
print "<td bgcolor="#FFA074"><INPUT TYPE="TEXT"
onSelect="update_brief_sum('ADD DATA SPACE','Give Space in MB')"
NAME="brief_summary" SIZE=25 maxlength="75"></td>n ";
}
Something must be missing b/c it's not working.
Any help will be greatly appreciated.
-jen
|