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

  1. #1

    Default Flash Form

    Is it possible to trigger the click event of a button, like in javascript, on the onchange/onblur event of another form element???

    Also, Is it possible to change the visibility of a button???
    jorgeloyo Guest

  2. Similar Questions and Discussions

    1. Pass URL Parameter from html form to flash form
      In CF, I have a link to a form to update a students attendance; takeattendancehv1.cfm?StudentID=#allstudents.StudentID# . I'm using a flash form in...
    2. Dynamically Adding Form Fields to CF Flash Form
      I think I know the answer to this but, after some failed Googles, I wanted to double-check here. I have a Flash-based event registration form I'm...
    3. Cannot pass form field variable from Flash form to CFC
      hello, could someone please help me with an issue i'm having.... i'm trying to pass data from flash form fields into my coldfusion component...
    4. mx 7 flash form The form data has expired, Please reloadthis page in your browser.
      When i first go to any flash form on my CFMX 7 server i get the following message. The form data has expired, Please reload this page in your...
    5. flash form: how to align form controls in table manner
      Lets say that we have three columns and two rows and each cell have an input. I can align the inputs vertically using html table. How do I do it the...
  3. #2

    Default Re: Flash Form

    yes,

    <cfinput type="button" onClick=".....">

    just remember you need to use actionscript, not javascript, in the onClick
    attribute. Also, some of the inputs use onClick, some us onChange - double
    check the cfdocs to make sure you are using the right one for the tag.

    For visibility, this will work.
    <cfinput visible="false"...

    hth,
    ---nimer

    "jorgeloyo" <webforumsuser@macromedia.com> wrote in message
    news:cuvsfv$dub$1@forums.macromedia.com...
    > Is it possible to trigger the click event of a button, like in javascript,
    > on the onchange/onblur event of another form element???
    >
    > Also, Is it possible to change the visibility of a button???

    Mike Nimer Guest

  4. #3

    Default Re: Flash Form

    Thank you, but I was interested in looking into the how... i tried <cfinput
    type='button' onClick='mybutton._click()'> and <cfinput type='button'
    onClick='mybutton.click()'> and all sort of variations, but i cannot seem to
    get it to work. Is there somewhere, a list of the events that we can trigger
    for each element, and the syntax to do it? Thank you in advanced.

    jorgeloyo Guest

  5. #4

    Default Re: Flash Form

    the onClick attribute is the event, you don't need to call it to invoke,
    flash will take care of that.. What you are putting in this attribute is
    what to have called when the onClick is invoked.

    <cfinput type="text" name="foo" onClick="alert('i was clicked');">

    hth,
    ----nimer


    "jorgeloyo" <webforumsuser@macromedia.com> wrote in message
    news:cv06rj$nl$1@forums.macromedia.com...
    > Thank you, but I was interested in looking into the how... i tried
    > <cfinput
    > type='button' onClick='mybutton._click()'> and <cfinput type='button'
    > onClick='mybutton.click()'> and all sort of variations, but i cannot seem
    > to
    > get it to work. Is there somewhere, a list of the events that we can
    > trigger
    > for each element, and the syntax to do it? Thank you in advanced.
    >

    Mike Nimer Guest

  6. #5

    Default Re: Flash Form

    Actually, i wanted to simulate a click of the button from the onchange of another form element
    jorgeloyo Guest

  7. #6

    Default Re: Flash Form

    on a related note, i'd like to know how to check or uncheck a checkbox based on
    the onclick event from a radio button. This is simple in Javascript, but i
    can't get it to work in the cfform. I'd also like to know if there is a
    resource with examples of thse ActionScripts. I'm sure it is probably a simple
    thing to do, i just need to know the syntax. THanks...Steve

    emanncsu1 Guest

  8. #7

    Default Re: Flash Form

    I agree... I am having trouble with the ActionScript, it'd be nice to have a list of samples in a CFFORM.
    jorgeloyo Guest

  9. #8

    Default Re: Flash Form

    in order to call a javascript function in a flash form you have to use action
    script getURL function. <cfinput type='button' name='expand' width='20'
    height='20' onclick=getURL('javascript:sendform('Title','title ','qform')')>
    Gary

    garyrgi Guest

  10. #9

    Default Re: Flash Form

    That's a really big order. Actionscript is a whole language in itself. So to
    just create a number of samples randomly may or may not be useful at all, it
    all depends if I happen to create an example that matches what you are
    trying to do.

    There are a number, a very large number of sites and books out there to help
    you learn actionscript. I would start there (here is a hit it's a lot like
    javascript, syntax wise)

    With that said, we are keeping track of the answers we give to help people
    and I plan on putting this together as a FAQ or blog or something like that
    soon.

    hth,
    ---nimer

    "jorgeloyo" <webforumsuser@macromedia.com> wrote in message
    news:cv0d5l$ab8$1@forums.macromedia.com...
    >I agree... I am having trouble with the ActionScript, it'd be nice to have
    >a list of samples in a CFFORM.

    Mike Nimer Guest

  11. #10

    Default Re: Flash Form

    try this.

    <cfinput type="radio" name="r1" onClick="c1.selected=true;">
    <cfinput type="checkbox" name="c1">

    hth,

    ---nimer

    "emanncsu1" <webforumsuser@macromedia.com> wrote in message
    news:cv0bd0$7p0$1@forums.macromedia.com...
    > on a related note, i'd like to know how to check or uncheck a checkbox
    > based on
    > the onclick event from a radio button. This is simple in Javascript, but
    > i
    > can't get it to work in the cfform. I'd also like to know if there is a
    > resource with examples of thse ActionScripts. I'm sure it is probably a
    > simple
    > thing to do, i just need to know the syntax. THanks...Steve
    >

    Mike Nimer Guest

  12. #11

    Default Re: Flash Form

    I should add, check out the asdoc for flex, on livedocs.macromedia.com.
    This will tell you all of the methods and properties that can be called with
    actionscript for each of the components.

    hth,
    ---nimer


    "Mike Nimer" <mnimer@macromedia.com> wrote in message
    news:cv2f0l$ch9$1@forums.macromedia.com...
    > That's a really big order. Actionscript is a whole language in itself. So
    > to just create a number of samples randomly may or may not be useful at
    > all, it all depends if I happen to create an example that matches what you
    > are trying to do.
    >
    > There are a number, a very large number of sites and books out there to
    > help you learn actionscript. I would start there (here is a hit it's a lot
    > like javascript, syntax wise)
    >
    > With that said, we are keeping track of the answers we give to help people
    > and I plan on putting this together as a FAQ or blog or something like
    > that soon.
    >
    > hth,
    > ---nimer
    >
    > "jorgeloyo" <webforumsuser@macromedia.com> wrote in message
    > news:cv0d5l$ab8$1@forums.macromedia.com...
    >>I agree... I am having trouble with the ActionScript, it'd be nice to have
    >>a list of samples in a CFFORM.
    >
    >

    Mike Nimer Guest

  13. #12

    Default Re: Flash Form

    well, after a little trial &amp; error i figured out how to do this: <cfinput
    type='checkbox' name='checkbox1' value='1' label='checkbox1'> <cfinput
    type='radio' name='name1' value='2' label='name1' visible='true'
    onclick='checkbox1.value=false'> This will make the checkbox unchecked when
    the radio button is clicked.

    emanncsu1 Guest

  14. #13

    Default Flash Form

    Let's say i need the user to enter their phone number, so i make the field
    required with the correct error message. But in addition to making it required,
    i want the format of the phone to be (999) 999-9999 I tried to do this, but as
    soon as the form loads, it displays the field in read, as if i had tried to
    submit the form already and i got the error message. Is this possible to do?
    <cfform format='flash' width='250'> <cfinput type='text' name='phone'
    label='Phone' mask='(999) 999-9999' required='yes' message='Enter Phone'>
    </cfform>

    jorgeloyo Guest

  15. #14

    Default Re: Flash Form

    It's red because it's required, and the message is displayed on mouseover. Did
    you try typing in numbers? It worked fine for me.
    OldCFer Guest

  16. #15

    Default Re: Flash Form

    I know It's red because it's required and the mask does work, but it should not be red when the form first loads. It should become red if you don't enter the info.
    jorgeloyo Guest

  17. #16

    Default Re: Flash Form

    There is a known issue, when we apply the mask to a field it triggers the
    validation at the same time. I believe this is what you are seeing.

    if you remove the required="true" it will work, and do the validation on the
    server or in your own <cfform onSubmit=""> actionscript.

    hth,
    ---nimer


    "jorgeloyo" <webforumsuser@macromedia.com> wrote in message
    news:cv2pbg$so5$1@forums.macromedia.com...
    > Let's say i need the user to enter their phone number, so i make the field
    > required with the correct error message. But in addition to making it
    > required,
    > i want the format of the phone to be (999) 999-9999 I tried to do this,
    > but as
    > soon as the form loads, it displays the field in read, as if i had tried
    > to
    > submit the form already and i got the error message. Is this possible to
    > do?
    > <cfform format='flash' width='250'> <cfinput type='text' name='phone'
    > label='Phone' mask='(999) 999-9999' required='yes' message='Enter Phone'>
    > </cfform>
    >

    Mike Nimer Guest

  18. #17

    Default Re: Flash Form

    Thank you Mike. If i make required=no and validate onsubmit, is it possible
    then to trigger something to make the element being validated red and display
    the custom message?? For example: I want to validate a phone number and i put
    a mask of (999) 999-9999 I not only want to force the mask, but validate that
    the phone entered is complete... lenght=13 [ including spaces, -, and () ] Can
    I make the element go red and show the custom message???

    jorgeloyo Guest

  19. #18

    Default Re: Flash Form

    You can't really write custom validation for the flash forms (they don't
    support regex). I think the best way would be to do the validation on the
    server.

    But if you want to trigger some validation, Ray Camden has a few blog
    postings about how to do this.
    [url]http://ray.camdenfamily.com/index.cfm?mode=entry&entry=FA116865-F677-4FA8-405C7E9D3C230448[/url]

    hth,
    ---nimer

    "jorgeloyo" <webforumsuser@macromedia.com> wrote in message
    news:cv5mq1$ahq$1@forums.macromedia.com...
    > Thank you Mike. If i make required=no and validate onsubmit, is it
    > possible
    > then to trigger something to make the element being validated red and
    > display
    > the custom message?? For example: I want to validate a phone number and i
    > put
    > a mask of (999) 999-9999 I not only want to force the mask, but validate
    > that
    > the phone entered is complete... lenght=13 [ including spaces, -, and () ]
    > Can
    > I make the element go red and show the custom message???
    >

    Mike Nimer Guest

  20. #19

    Default Flash Form

    Ok I have a cd-rom that uses a cfm file on my server to send out email from the
    CD. The form had 4 email addresses in list you can choose which one to send to
    or send to multiple addresses. What I can't figure out is how to get the list
    component an ID name that can be recognized in my cfm form. Any help would be
    appreciated. BTW, the hosting uses Coldfusion 4.5 and I'm using FLash MX 2004.

    I can get it to work in html but not flash.

    here's the cfm code:

    <form action="http://www.creativepointe.com/emailform_henderson.cfm"
    method="post" name="form1" target="_self">
    <p>
    <input name="Name" type="text" id="Name">
    <br>
    <br>
    <input name="Company" type="text" id="Company">
    <br>
    <br>
    <input name="Email" type="text" id="Email">
    </p>
    <p>
    <input name="Phone" type="text" id="Phone">
    </p>
    <p>
    <input name="Comments" type="text" id="Comments">
    </p>
    <p>
    <select name="Toemail" size="3" multiple id="Toemail">
    <option value="damon@sigecom.net">Damon Home</option>
    <option value="damon@creativepointe.com">Damon Work</option>
    <option value="billing@creativepointe.com">Billing</option>
    </select>
    </p>
    <p>
    <input type="submit" name="Submit" value="Submit">
    </p>
    </form>



    Webguru1 Guest

  21. #20

    Default flash form

    created a form in flash for website. have all the field validations working but
    when i execute the submit commmand there are no error messages so the post must
    be working but the email never gets sent...does anyone know of a canned one
    (asp or php)on the internet that works?...and also i was wondering if it is
    possible to attach a a file to a formemail?...maybe a tutorial on building a
    formail script?...thanks for the help

    leaguer44 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