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

  1. #1

    Default CF 7

    Can anyone point me to a document that shows how to have a flash form and use
    the onsubmit attribute to use a custom javascript validation function instead
    of the inbuilt validation ?

    I have tried
    <cfform action="mypage.cfm" method="POST" name="MyCFForm" width="750"
    format="Flash" onSubmit="myfunction();">
    <cfform action="mypage.cfm" method="POST" name="MyCFForm" width="750"
    format="Flash" onSubmit="myfunction;">

    Ken


    The ScareCrow Guest

  2. #2

    Default Re: CF 7

    Here is code we use on our tabnavigator form:
    onclick='#CheckFieldSet('filed1,filed2,filed3','Fo rmName','FormName.SelectedInde
    x=1') This code references a custom UDF written by Ray Camden: <cffunction
    name='checkFieldSet' output='false' returnType='string'> <cfargument
    name='fields' type='string' required='true' hint='Fields to search'>
    <cfargument name='form' type='string' required='true' hint='Name of the form'>
    <cfargument name='ascode' type='string' required='true' hint='Code to fire if
    all is good.'> <cfargument name='message' type='string' required='false'
    default='You have not completed one or more of the items on this
    page.\nPlease correct the items in red.' hint='Message to display
    on error.'> <cfset var vcode = ''> <cfset var f = ''> <cfsavecontent
    variable='vcode'> var ok = true; <cfloop index='f'
    list='#arguments.fields#'> <cfoutput>
    if(!mx.validators.Validator.isValid(this, 'FormName.#f#')) { if(ok)
    mx.controls.Alert.show('#arguments.message#'); ok = false;};
    </cfoutput> </cfloop> </cfsavecontent> <cfset vcode = vcode &amp;
    'if(ok) #ascode#'> <cfset vcode =
    replaceList(vcode,'#chr(10)#,#chr(13)#,#chr(9)#',' ,,')> <cfreturn vcode>
    </cffunction>

    pflynn02 Guest

  3. #3

    Default Re: CF 7

    Thanks for the reply, pflynn02

    A couple of questions

    I assume that because of the onclick attribute the function is called from the
    form submit button ?
    I also assume that the code for the function has to be in the form page.

    The reason I need to do this is because of radio buttons.
    I have 3 radio buttons (groups) that are required. Now when I include the
    required attribute, I actually get 2 alert boxes for each radio button.

    I get the one for all the required fields that have no value, plus hidden
    behind this alert is an alert for each radio button.

    Any idea on how to get rid of the individual ones ?

    I have just about gone mad trolling through the live docs.

    Ken

    The ScareCrow Guest

  4. #4

    Default Re: CF 7

    The code I provided is if you are using a tab navigation, it validates each tab
    when you click that button to goto the next tab. I just used the code, it was
    written my ray camden who knows a ton about CF forms, try emailing him, he
    helped me out a ton. [email]ray@camdenfamily.com[/email]. Sorry I cant help you out any better
    than that. I am also sick of surfing the live docs, macromedia needs to provide
    some more demos and resources other than the very few they have for CF7.

    pflynn02 Guest

  5. #5

    Default CF 7

    I have installed the new CF 7 server and everthing is running well. I am
    likeing the new server a lot. We are going from 5 to 7. Lots of new
    functionality here. I watched the demo for the CF7 server from Macromedia and
    it says we can now connect to other machines with a TCP connection. I am
    wondering how to do this. We have a nexserve transaction server here and I
    would like to know how to make this connection. Can someone shed some light on
    how I would go about this. Thanks

    xring Guest

  6. #6

    Default Re: CF 7

    On 2005-05-02 11:45:41 -0500, "xring" <webforumsuser@macromedia.com> said:
    > I have installed the new CF 7 server and everthing is running well. I
    > am likeing the new server a lot. We are going from 5 to 7. Lots of
    > new functionality here. I watched the demo for the CF7 server from
    > Macromedia and it says we can now connect to other machines with a TCP
    > connection. I am wondering how to do this. We have a nexserve
    > transaction server here and I would like to know how to make this
    > connection. Can someone shed some light on how I would go about this.
    > Thanks
    You're going to want to look into the new Event Gateway functionality.
    There are some articles on macromedia.com as well as in the latest
    ColdFusion Developer's Journal and MX Developer's Journal.

    Matt
    --
    Matt Woodward
    [email]mpwoodward@gmail.com[/email]
    Team Macromedia - ColdFusion

    mpwoodward *TMM* Guest

  7. #7

    Default CF 7

    I have a server running CENTOS 4.2 and cfmx7 have 12 domain names running on
    this server and 1 that will not work with cf. The domain name has a .us
    extension I was wondering is there a setting in cf admin that I have to adjust
    to work with .us? Or is this some other problem to look after.

    gene02 Guest

  8. #8

    Default Re: CF 7

    gene02 wrote:
    > I have a server running CENTOS 4.2 and cfmx7 have 12 domain names
    > running on this server and 1 that will not work with cf. The domain
    > name has a .us extension I was wondering is there a setting in cf
    > admin that I have to adjust to work with .us? Or is this some other
    > problem to look after.
    CF doesn't have a problem with .us domains, I think you'll need to search
    someplace else...

    --
    <mack />


    Neculai Macarie 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