|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
try:
function update_brief_sum(msg,brief_summary) { var brief_summary = " " var strMsg = "Give space in MB"; var msg = document.mktdata.SelProblem.options[document.mktdata.SelProblem.Sel ectedIndex].text; if (msg == "ADD DATA SPACE") { document.mktdata.brief_summary.value = strMsg; } } Than call update_brief_sum(); [don't think params are invoked that way ...(not sure though) [This message has been edited by shedder (edited 11-09-99).] |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > Automatic population of text box |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|