Ask a Question related to Coldfusion - Getting Started, Design and Development.

  1. #1

    Default save file

    I have checkbox item create in form and dynamic checkbox created by javascript.
    I want to save a value of these item (only value of the items that checkbox is
    checked in one file. How do I do that? I only know that I have to use
    <cfdocument> but I dont know how to check condition of the checkbox and how to
    get value from javascript.

    <script type="text/javascript">
    var k =3;
    function addItem(myTable){
    name = "chk" + (k++);
    text = document.form.text.value;
    var lastRow = myTable.rows.length;
    var x=myTable.insertRow(lastRow);
    var y=x.insertCell(0);
    y.innerHTML='<input type="checkbox" name="+name+" value="+text+">' + text;
    }
    </script>
    <table id='tbl1'>
    <tr>
    <td><input type="checkbox" name="chk1" value="Row1">Row1</td>
    </tr>
    <tr>
    <td><input type="checkbox" name="chk2" value="Row2">Row2</td>
    </tr>
    </table>

    sweetyp2005 Guest

  2. Similar Questions and Discussions

    1. cannot save .cfm file
      I am having trouble saving .cfm using contribute. i can save .html files with no problem. doesnt anyone know why this is?? thanks
    2. Can't save file in CS
      When i try to export a file from Ill CS to an version 8 EPS file it gives me the error message : "Can't save the illustration. There isn't enough...
    3. Can't SAVE over an old file!
      There is no solution to this problem yet.
    4. Unable to Save/Save As/close Word XP file with Acrobat 5.0 installed
      One of my user is having this problem on her Windows XP PC: Dell GX260 with Windows XP Professional running 512MB RAM, Office XP, Acrobat 5.0 ...
    5. Open file, make changes, save file, close, re-open, file contents not changed
      I've now run into this several times and it's completely destroyed all of my confidence in Ilustrator CS on Mac. I'm hoping someone can confirm that...
  3. #2

    Default Re: save file

    Your first problem is that you don't have either a form or cfform tag, so there
    is nothing to submit. Once you sort that out, you will need a submit control,
    or button with an onclick event handler to submit the form.

    On the page to which you submit the form, write some code to process the
    fields and do what you want to do. If you want to save the values to a file on
    your server, you will be using the cffile tag. If you want the user to be able
    to save a file on his computer, you can use cfcontent, or cfdocument format =
    "pdf"

    Happy coding.

    Dan Bracuk 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