Skip to main content
August 7, 2007
Question

Form Refreshing

  • August 7, 2007
  • 3 replies
  • 652 views
Two questions...

1) How do I refresh a <cfform format="html" > based on a "Onchange()" event ?
2) How do I refresh a <cfform format="flash" > based on a "Onchange()" event ?

Thanks,
Bob
    This topic has been closed for replies.

    3 replies

    August 8, 2007
    Can I get an answer to my two posts on this board?
    Thank you,
    Bob
    August 7, 2007
    Robert, what doctype are you using?
    August 7, 2007
    I am using nested forms as listed below. I want to reload the inner form when there is a change detected on the <cfselect ...> statement inside the flash (inner) form.

    <cfform action="add_member.cfm" format="html" enctype="multipart/form-data" >

    <cfform action="add_member.cfm" name="NewMember" enctype="multipart/form-data" skin="halosilver" height="475" width="350" title="New Member Data" format="flash" >


    <div align="center">
    <cfset width = 220>

    <cfselect name="Account_Type"
    width="#width#"
    onChange="window.location.reload(true);"
    label="Account Type:">
    <option value="1" selected>Listener</option>
    <option value="2" >Artist/Listener</option>
    </cfselect>


    </cfform>
    </cfform>
    August 7, 2007
    Quick way: in the form control that will be changed (and for which you want a page refresh), use an "onchange" event handler, like this:

    <cfselect name="poison" onchange="window.location.reload(true);">
    ...
    August 7, 2007
    Did not work, I have attached my code.
    The flash form does not load at all, just a white background.
    What did I do wrong?
    Bob


    -------------->>>>>>>>>>>>>>>
    <cfform action="add_member.cfm"
    name="NewMember"
    enctype="multipart/form-data"
    skin="halosilver"
    height="475"
    width="350"

    title="New Member Data"
    format="flash" >


    <div align="center">
    <cfset width = 220>

    <cfselect name="Account_Type"
    width="#width#"
    onChange="window.location.reload(true);"
    label="Account Type:">
    <option value="1" selected>Listener</option>
    <option value="2" >Artist/Listener</option>
    </cfselect>