Refresh select from new data entered in pop-up window

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default Refresh select from new data entered in pop-up window

    This is for a client admin section. I am using CF 4.5 and an Access Database.

    I have a form which uses a dynamically created drop-down list. I want to
    insert an 'Add' button next to the drop-down list that will open a pop-up
    window where the client can add new information, save that new information to
    the database, then close the window only to have the information which has just
    been entered into the database now available in the drop-down list. I do not
    want to refresh the entire form ? just the drop-down list.

    Any way to do this. I thought I had seen this done before or am I just
    dreaming?

    Thanks in advance for your help,

    David G. Moore, Jr.
    UpstateWeb LLC

    Doogie Guest

  2. Similar Questions and Discussions

    1. Close Window Refresh
      Is there a way to close a pop-up window by use of a button and have the main window refresh. I use to know the code but I forgot.
    2. Populate select field and textbox dynamically - no refresh
      Ive got a db table with the fields Product_Name and Product_Price. I want to display a pulldown containing the product names and display the...
    3. popup window refresh--Massimo help?
      hi, i am using a popup window to show bios for different people. i want it to work so that if someone clicks a list item a window opens with the...
    4. Refresh a parent window???
      I have a frameset. left and main. Inside the main frame I have a IFRAME. I need to refresh the main frame when I post a form inside the IFRAME. I am...
    5. Refresh Parent window from child window causes problems
      Hi All, I have a problem with trying to refresh the parent window from child window in order to update data in the parent window. The sequence...
  3. #2

    Default Re: Refresh select from new data entered in pop-upwindow

    This is possible in JavaScript. You can use a prompt to get the item to add,
    then add it to the select box. JavaScript can access or modify items in a
    select box as an array. Keep in mind that the first item is at position 0. If
    you get the length of the array (the number of items in the select box), you
    can use that value as the array subscript of an item to add at the end.

    Here are the basic JavaScript commands:

    var listadd = prompt("Enter the item to add: ");

    var newitem = document.myform[selbox].length;
    document.myform[selbox].options[newitem].text = newitem;
    document.myform[selbox].options[newitem].value = newitem;

    "myform" is the name of your form and "selbox" the name of the select box.

    -Paul

    dempster Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139