Skip to main content
Inspiring
August 18, 2006
Question

geturl() post help

  • August 18, 2006
  • 1 reply
  • 437 views
I am trying to fake a form submit with a button that is supposed to execute geturl based on the user setting the url value by clicking on radio buttons. I don't know the syntax for Post with geturl() or quite sure how to get the value of radiobuttons. Any help would be great.

<CFSAVECONTENT variable="change">
if (reportName.selectedItem.data == "1"){
getURL("page1.cfm", "_blank");
} else if (selectName.selectedItem.data == "2") {
getURL("page2.cfm", "_blank");
}
</CFSAVECONTENT>

<cfform action="" target="_blank" method="post" name="form1" preloader="no" format="flash" height="400" width="300" skin="halosilver"timeout="6000">
<cfinput type="radio" name="" value="1" label="Full Commission Detail" >
<cfinput type="radio" name="" value="2" label="Full Commission Detail" >
<cfinput name="CreateReport" type="button" value="" onChange="#change#">
</cfform
    This topic has been closed for replies.

    1 reply

    Participating Frequently
    August 21, 2006
    the cfsavecontent way

    <cfsavecontent variable="clickURL">
    if(form1.rad1==1){
    getURL("page1.cfm", "_blank");
    }
    if(form1.rad2==2){
    getURL("page2.cfm", "_blank");
    }

    </cfsavecontent>

    <cfform method="post" name="form1" format="flash" height="400" width="300" skin="halosilver">


    <cfinput type="radio" name="rad1" value="1" label="Full Commission Detail">
    <cfinput type="radio" name="rad2" value="2" label="Full Commission Detail">
    <cfinput name="CreateReport" type="button" value="Click" onclick="#clickURL#">


    </cfform>


    or the cfformitem way

    <cfform method="post" name="form1" format="flash" height="400" width="300" skin="halosilver">
    <cfformitem type="script">
    function clickURL(){
    if(form1.rad1==1){
    getURL("page1.cfm", "_blank");
    }
    if(form1.rad2==2){
    getURL("page2.cfm", "_blank");
    }

    }
    </cfformitem>


    <cfinput type="radio" name="rad1" value="1" label="Full Commission Detail">
    <cfinput type="radio" name="rad2" value="2" label="Full Commission Detail">
    <cfinput name="CreateReport" type="button" value="Click" onclick="clickURL()">


    </cfform>