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

  1. #1

    Default CFFORM onSubmit()

    I have been trying to figure this one out. Haven't found the solution by
    searching the forums. I'm hoping someone else has come across this and will be
    able to offer insight.
    I have created a CFFORM, FORMAT="flash", in ColdFusion MX7. The form works
    fine. However, if I add an onSubmit() to the CFFORM tag, or an onSubmit() or an
    onChange() to a child object - a CFSELECT or a CFINPUT for example - the form
    no longer displays when I load the page. What am I missing here?


    :confused;

    Thanks for any help,
    Melanie


    (WORKS)

    <CFFORM FORMAT="flash" ACTION="cardverify.cfm" METHOD="POST"
    PRESERVEDATA="yes" TIMEOUT="60" WIDTH="60%" HEIGHT="50%"
    SKIN="HALOBLUE" WMODE="opaque" NAME="CARDFORM"
    style="backgroundColor:##FFFFCC;" >
    <CFFORMGROUP TYPE="tabnavigator" style="backgroundColor:##FFFFCC;" >
    <CFFORMGROUP TYPE="page" LABEL="PAGE1">
    <CFINPUT TYPE="TEXT" NAME="CARDDESC" LABEL="Description:" REQUIRED="yes"
    MESSAGE="Please enter a description for this card"
    WIDTH="400" MAXLENGTH="40" TOOLTIP="Enter a description for this card">
    <CFSELECT NAME="EMPLOYEEID" LABEL="Employee:" REQUIRED="yes" MESSAGE="Please
    select an employee"
    WIDTH="200" TOOLTIP="Select an employee" SIZE="1" MULTIPLE="NO"
    QUERY="qEmployees" VALUE="EmployeeID" DISPLAY="FirstName"></CFSELECT>
    </CFFORMGROUP>
    </CFFORMGROUP>
    </CFFORM>

    (DOES NOT WORK)

    <CFFORM FORMAT="flash" ACTION="cardverify.cfm" METHOD="POST"
    PRESERVEDATA="yes" TIMEOUT="60" WIDTH="60%" HEIGHT="50%"
    SKIN="HALOBLUE" WMODE="opaque" NAME="CARDFORM"
    style="backgroundColor:##FFFFCC;" >
    <CFFORMGROUP TYPE="tabnavigator" style="backgroundColor:##FFFFCC;"
    onSubmit="myOnSubmit();">
    <CFFORMGROUP TYPE="page" LABEL="PAGE1">
    <CFINPUT TYPE="TEXT" NAME="CARDDESC" LABEL="Description:" REQUIRED="yes"
    MESSAGE="Please enter a description for this card"
    WIDTH="400" MAXLENGTH="40" TOOLTIP="Enter a description for this card">
    <CFSELECT NAME="EMPLOYEEID" LABEL="Employee:" REQUIRED="yes" MESSAGE="Please
    select an employee"
    WIDTH="200" TOOLTIP="Select an employee" SIZE="1" MULTIPLE="NO"
    QUERY="qEmployees" VALUE="EmployeeID" DISPLAY="FirstName"></CFSELECT>
    </CFFORMGROUP>
    </CFFORMGROUP>
    </CFFORM>

    dawntx Guest

  2. Similar Questions and Discussions

    1. Basic CFMail and onSubmit question
      Try changing <form name= "validation" onSubmit action="thanks.cfm" method="post"> to <form name= "validation" action="thanks.cfm" method="post">
    2. MX7 problem with cfform onSubmit behavior
      Mike says, "This is a known bug, we found this to late in the development cycle to get it in." I can't find any other documentation about this bug...
    3. CFFORM OnSubmit Attribute trumps CFINPUT ValidateAttribute
      On Our System, I compared rendered source html files from a ColdFusion 5 Server and ColdFusion MX7 Server for an example program that included a...
    4. onSubmit
      Is there a way to use the onSubmit action in a cfform since coldfusion uses that to run it stuff for verification? Thanks in advance!!
    5. onSubmit question
      Can you make multiple (two) calls to a javascript function for the onSubmit event? Currently, I'm calling one JS function like the following: ...
  3. #2

    Default Re: CFFORM onSubmit()

    If you are using flash forms you must use Actionscript, not Javascript.

    --
    Tom Jordahl
    Macromedia Server Development


    Tom Jordahl Guest

  4. #3

    Default Re: CFFORM onSubmit()

    DOH!
    Thank you!


    dawntx 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