#1
  1. No Profile Picture
    jmachado
    Guest
    Devshed Newbie (0 - 499 posts)
    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. #2
  3. No Profile Picture
    shedder
    Guest
    Devshed Newbie (0 - 499 posts)
    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).]

Similar Threads

  1. importing text file
    By min in forum PHP Development
    Replies: 12
    Last Post: November 26th, 2003, 04:18 AM
  2. changing the buttons in the message box
    By crackerweb in forum Visual Basic Programming
    Replies: 6
    Last Post: October 23rd, 2003, 06:36 PM
  3. Select Boxes to text box
    By chainsmoker in forum HTML Programming
    Replies: 10
    Last Post: October 14th, 2003, 11:02 AM
  4. Links within a dynamic text box
    By Hoffy in forum Flash Help
    Replies: 0
    Last Post: August 27th, 2003, 01:05 AM
  5. Passing desc from select box into text box
    By acetone_lin in forum HTML Programming
    Replies: 2
    Last Post: August 31st, 2001, 06:16 PM

IMN logo majestic logo threadwatch logo seochat tools logo