Cfselect and onClick

I have a cfselect statement whit the following options.
"Select" "Men" "Women" "Boys" "Girls" "Infants".
it is defaulted to "Select" but the user must select one of
the other options to continue.
What I want is to be able to include an onClick in the select
statment to display the rest of the page. because depending on
which option you take, the rest of the page will be different.
Ex if the user selects "Men" - there are 4 more questions
regarding men, if "Women" is selected, 7 questions regarding women
so on and so forth....
I know i can do it by forwarding the user to another page but
I would like to embed it all in the same page...
Thanks in advance
Craig

For what you want to achieve, it's going to be tough. You
might be able to figure something out with inner html.
I had a similar problem once and solved it with two forms. In
my case checking or unchecking a checkbox would determine what form
was visible.

Similar Messages

  • Map Builder SVG onmouseover and onclick

    Hi,
    I'd like to know more about these functions in Map Builder.
    I'd like to be able to change the color of a marker using onmouseover,
    and select that marker by using onclick. Any info. would help.
    Thanks,
    Marlene

    Hi Marlene,
    these theme attributes (onmouseover and onclick) are to be used when you have an application with MapViewer that generates a SVG map. They define the method to call on your application script. MapBuilder does not generate SVG maps. You can fill these parameters with some name, and save the predefined theme. Then you need to develop an application code for SVG implementing these methods. After you deploy MapViewer kit, you should find on the MapViewer web page some demos including SVG.
    Joao

  • Reverse action and onclick on commandButton.

    Hi, my question is about this:
    In jspx.
    <af:commandButton text="Report" blocking="false"
    action="#{myOwnBean.report_Action}"
    onclick="#{myOwnBean.chainWeb}"/>
    I want execute action first, and then onclick in second place.
    Are there some way to do this? And, how is this done?
    Please, if you could give me some examples.
    Thank you very much.
    In myOwnBean. It changes "chainWeb", the chain may vary, that's why I want to do the opposite.
    private String chainWeb;
    public void report_Action() {
    // In this place I want create a set of dynamic URLs.
    chainWeb="window.open(\"http://www.google.com\" , \"window1\" , \"width=120,height=300,scrollbars=NO\");window.open(\"http://www.oracle.com\" , \"window2\" , \"width=120,height=300,scrollbars=NO\");parent.parent.close();";
    }

    What about this?:
    <af:commandButton text="Report" blocking="false" onclick="#{myOwnBean.chainWeb}"/>Then in the bean do this?:
    public MyOwnBean {
      private String chainWeb;
      public String getChainWeb() {
        chainWeb = "window.open(\"http://www.google.com\" , \"window1\" , \"width=120,height=300,scrollbars=NO\");window.open(\"http://www.oracle.com\" , \"window2\" , \"width=120,height=300,scrollbars=NO\");parent.parent.close();"
        // or alternatively call any other bean code to work out what you want to set chainWeb to.
        return chainWeb;
    }... in that manner the work done by your original report_action method is done in the getChainWeb method. Is that suitable?
    As you know the action attribute of the commandButton is designed for returning navigation rules as calculated on the server after the user submits the page back to the midtier. In turn onclick is a client side JavaScript event and will always fire in the browser before the action attribute is processed by the mid-tier.
    A further issue I see is that the EL expression for the onclick JavaScript attribute will be evaluated when the page is fetched, not when the user onclicks. As such if you want the result of chainWeb to be dependent on values on the current screen, you'll need to know how to extract them in your JavaScript from the DOM, as separate to fetching them from a bean or binding component.
    CM.

  • CFSELECT and queries

    I am trying to pull some dates out of my database, and have
    them show up in
    a <cfselect> that users than then pick.
    I have:
    <cfselect name="ClassDate" size="1" required="yes"
    message="Please select
    the date the class began." query="RequestDate"
    value="class_date"
    display="class_date">
    But my problem is on the date formatting. Its a MySql date
    field, and so it
    shows the whole 'ts date time' etc.
    How can I do this so all I show in the <cfselect> is
    the date, formatted
    like 03/05/2006, etc?
    Thanks!
    Steve

    Well my format is a little off from what you want but just
    look up
    date_format on mysql web site and you will get it.
    "Rick" <[email protected]> wrote in message
    news:ejg9am$t6s$[email protected]..
    > Try something like this in your query.
    >
    > SELECT *, date_format(SchDate, '%W, %b %D, %Y') as sdate
    >
    >
    > "Steve Grosz" <[email protected]> wrote in
    message
    > news:ejg92i$t0h$[email protected]..
    >>I am trying to pull some dates out of my database,
    and have them show up
    >>in a <cfselect> that users than then pick.
    >>
    >> I have:
    >>
    >> <cfselect name="ClassDate" size="1"
    required="yes" message="Please select
    >> the date the class began." query="RequestDate"
    value="class_date"
    >> display="class_date">
    >>
    >> But my problem is on the date formatting. Its a
    MySql date field, and so
    >> it shows the whole 'ts date time' etc.
    >>
    >> How can I do this so all I show in the
    <cfselect> is the date, formatted
    >> like 03/05/2006, etc?
    >>
    >> Thanks!
    >> Steve
    >>
    >
    >

  • Selected Value for CFSelect and other options too

    I have an update form with an "Office" field. For a record, I
    query the db and get all the data for the record including the
    current office. However, since this is an update/edit form, I want
    the current office to display as selected, but want to also include
    all the other offices. How Do I do this in a cfselect? I can figure
    out how to either display the current office, and no other offices,
    or I can display all the offices, but not have the current office
    selected. Argh.

    you have a query that pulls data for current record - let's
    call it
    REC_QUERY, and let's say the field with the office data is
    called... OFFICE
    have another query that pulls all offices - let's call it
    OFFICE_QUERY
    set the QUERY attrib of your cfselect to OFFICE_QUERY
    set appropriate DISPLAY and VALUE attributes
    set the SELECTED attribute of your cfselect to
    #REC_QUERY.OFFICE#
    hth
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com

  • Bind in form works with cfinput, how to with cfselect and a href

    Hi all
    This code workks binding a cfinput in an HTML cfform:
    Name:<cfinput type="text" name="FIRSTNAME" label="Name" required="yes" width="150" bind="{UsersGrid.FIRSTNAME}" >
    However this href doesn't seem to bind correctly:
    <a  href="http://www.google.com/search?hl=en&output=search&sclient=psy-ab&q={UsersGrid.COMPANY}&btnK=" bind="{UsersGrid.COMPANY}">Google.com</a>
    This cfselect doesn't either:
    Department: <cfselect name="DEPARTMENT1" width="100" size="1" label="Department" required="yes" bind="UsersGrid.DEPARTMENT1">
    <option></option><cfoutput query="dNames"><option value="#DEPARTMENTIDS#">#DEPARTMENTNOM#</option></cfoutput>
    </cfselect> 
    How can I make them both work? Thank you

    Sure, Aaaron here it is, it uses the same database tables and datasource as in the other thread:
    <cfquery name="QNAMES" datasource="tester">
        select * from company, industries, division
    where company.SECTORS1 = industries.SECTORSIDS
    <cfif structKeyExists(url,"sectorid")>
    and industries.SECTORSIDS = #url.sectorid#</cfif>
    and division.DEPARTMENTIDS = company.DEPARTMENT1
    and company.WHEN = 2
    ORDER BY company</cfquery>
    <cfquery name="dNames" datasource="tester">
        select DEPARTMENTIDS, DEPARTMENTNOM
        from division
    order by DEPARTMENTNOM</cfquery>
    <CFQUERY name="industries" datasource="tester">
    SELECT * FROM industries
    </CFQUERY>
    <CFQUERY name="salesstep" datasource="tester">
    SELECT * FROM sales
    </CFQUERY>
    <CFQUERY name="xity" datasource="tester">
    SELECT * FROM ciudad
    </CFQUERY>
    <CFQUERY name="hols" datasource="tester">
    SELECT * FROM holidays
    </CFQUERY>
    <!--- UPDATE QUERY --->
    <cfif isDefined("FORM.UPDATEADDBTN")>
    <cfif FORM.ENTID GTE 1>
    <cfset isCOMPANYNull = iif(len(trim(FORM.COMPANY)) EQ 0, true, false)>
    <cfset isSECTORS1Null = iif(len(trim(FORM.SECTORS1)) EQ 0, true, false)>
    <cfset isRANKINGNull = iif(len(trim(FORM.RANKING)) EQ 0, true, false)>
    <cfset isPRICENull = iif(len(trim(FORM.PRICE)) EQ 0, true, false)>
    <cfset isDEPARTMENT1Null = iif(len(trim(FORM.DEPARTMENT1)) EQ 0, true, false)>
    <cfset isFIRSTNAMENull = iif(len(trim(FORM.FIRSTNAME)) EQ 0, true, false)>
    <cfset isPOSNull = iif(len(trim(FORM.POS)) EQ 0, true, false)>
    <cfset isPHONENull = iif(len(trim(FORM.PHONE)) EQ 0, true, false)>
    <cfset isEMAILNull = iif(len(trim(FORM.EMAIL)) EQ 0, true, false)>
    <cfset isMOBILENull = iif(len(trim(FORM.MOBILE)) EQ 0, true, false)>
    <cfset isADDRESSNull = iif(len(trim(FORM.ADDRESS)) EQ 0, true, false)>
    <cfset isCITYNull = iif(len(trim(FORM.CITY)) EQ 0, true, false)>
    <cfset isCOMMENTSNull = iif(len(trim(FORM.COMMENTS)) EQ 0, true, false)>
    <cfset MEETINGDATE = trim(FORM.ABUNDANCE)>
    <!--- DATECFM--->
    <cfset isMTGTNull = iif(len(trim(FORM.MTGT)) EQ 0, true, false)>
    <cfset isSTATE1Null = iif(len(trim(FORM.STATE1)) EQ 0, true, false)>
    <CFQUERY name="updatecompany" datasource="tester">
    update COMPANY
    SET COMPANY = <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.COMPANY)#" null="#isCOMPANYNull#" />,
       SECTORS1 = <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.SECTORS1)#" null="#isSECTORS1Null#" />,
       RANKING = <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.RANKING)#" null="#isRANKINGNull#" />,
       PRICE = <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.PRICE)#" null="#isPRICENull#" />,
       DEPARTMENT1 = <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.DEPARTMENT1)#" null="#isDEPARTMENT1Null#" />,
       FIRSTNAME = <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.FIRSTNAME)#" null="#isFIRSTNAMENull#" />,
       POS = <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.POS)#" null="#isPOSNull#" />,
       PHONE = <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.PHONE)#" null="#isPHONENull#" />,
       EMAIL = <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.EMAIL)#" null="#isEMAILNull#" />,
       MOBILE= <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.MOBILE)#" null="#isMOBILENull#" />,
       ADDRESS = <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.ADDRESS)#" null="#isADDRESSNull#" />,
       CITY = <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.CITY)#" null="#isCITYNull#" />,
       COMMENTS = <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.COMMENTS)#" null="#isCOMMENTSNull#" />,
       ABUNDANCE = <cfqueryparam cfsqltype="cf_sql_timestamp" value="#MEETINGDATE#" />,
       MTGT = <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.MTGT)#" null="#isMTGTNull#" />,
       STATE1 = <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.STATE1)#" null="#isSTATE1Null#" />
    WHERE ENTID = #FORM.ENTID#
    </CFQUERY>
    <CFLOCATION URL="testht.cfm?begin=1">
    <cfelse>
    <cfset isCOMPANYNull = iif(len(trim(FORM.COMPANY)) EQ 0, true, false)>
    <cfset isSECTORS1Null   = iif(len(trim(FORM.SECTORS1)) EQ 0, true, false)>
    <cfset isRANKINGNull = iif(len(trim(FORM.RANKING)) EQ 0, true, false)>
    <cfset isPRICENull = iif(len(trim(FORM.PRICE)) EQ 0, true, false)>
    <cfset isDEPARTMENT1Null = iif(len(trim(FORM.DEPARTMENT1)) EQ 0, true, false)>
    <cfset isFIRSTNAMENull = iif(len(trim(FORM.FIRSTNAME)) EQ 0, true, false)>
    <cfset isPOSNull = iif(len(trim(FORM.POS)) EQ 0, true, false)>
    <cfset isPHONENull = iif(len(trim(FORM.PHONE)) EQ 0, true, false)>
    <cfset isEMAILNull = iif(len(trim(FORM.EMAIL)) EQ 0, true, false)>
    <cfset isMOBILENull = iif(len(trim(FORM.MOBILE)) EQ 0, true, false)>
    <cfset isADDRESSNull = iif(len(trim(FORM.ADDRESS)) EQ 0, true, false)>
    <cfset isCITYNull = iif(len(trim(FORM.CITY)) EQ 0, true, false)>
    <cfset isCOMMENTSNull = iif(len(trim(FORM.COMMENTS)) EQ 0, true, false)>
    <cfset isMTGTNull = iif(len(trim(FORM.MTGT)) EQ 0, true, false)>
    <cfset isSTATE1Null = iif(len(trim(FORM.STATE1)) EQ 0, true, false)>
    <cfset MEETINGDATE = trim(FORM.ABUNDANCE)>
    <!--- DATECFM --->
    <!--- ADD COMPANY QUERY --->
    <CFQUERY name="addcompany" datasource="tester">
    INSERT INTO COMPANY(
    COMPANY,
    SECTORS1,
    RANKING,
    PRICE,
    DEPARTMENT1,
    FIRSTNAME,
    POS,
    PHONE,
    EMAIL,
    MOBILE,
    ADDRESS,
    CITY,
    COMMENTS,
    ABUNDANCE,
    MTGT,
    STATE1
    VALUES (
    <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.COMPANY)#" null="#isCOMPANYNull#" />,
    <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.SECTORS1)#" null="#isSECTORS1Null#" />,
    <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.RANKING)#" null="#isRANKINGNull#" />,
    <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.PRICE)#" null="#isPRICENull#" />,
    <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.DEPARTMENT1)#" null="#isDEPARTMENT1Null#" />,
    <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.FIRSTNAME)#" null="#isFIRSTNAMENull#" />,
    <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.POS)#" null="#isPOSNull#" />,
    <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.PHONE)#" null="#isPHONENull#" />,
    <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.EMAIL)#" null="#isEMAILNull#" />,
    <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.MOBILE)#" null="#isMOBILENull#" />,
    <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.ADDRESS)#" null="#isADDRESSNull#" />,
    <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.CITY)#" null="#isCITYNull#" />,
    <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.COMMENTS)#" null="#isCOMMENTSNull#" />,
    <cfqueryparam cfsqltype="cf_sql_timestamp" value="#MEETINGDATE#" />,
    <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.MTGT)#" null="#isMTGTNull#" />,
    <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.STATE1)#" null="#isSTATE1Null#" />
    </CFQUERY>
    <!---DATE_FORMAT(datetime_field_name,'%Y-%m-%d');--->
    <CFLOCATION URL="testht.cfm?begin=1">
    </cfif>
    </cfif>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml"> 
    <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    <title>Sales</title> 
    <link rel="stylesheet" href="style.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="formst.css" type="text/css" media="screen" />
    </head>
    <cfdump var=#qnames#>
    <cfajaxproxy bind="javascript:myHandler({UsersGrid.COMPANY},{UsersGrid.SECTORS1},{UsersGrid.DEPARTMENT 1})"/>
    <script type="text/javascript">
      function myHandler(COMPANY,SECTORS1,DEPARTMENT1) {
          //update the link's href
          document.getElementById('myLink').href = 'http://www.google.com/search?q=' + COMPANY;
          document.getElementById('Linkedin').href = 'http://www.google.com/search?q=linkedin' + COMPANY;
          //update SECTORS1's selected
          var theField = document.getElementById('SECTORS1');
          for(var i=0; i<theField.options.length; i++) {
              if(theField.options[i].value==SECTORS1) {
                  theField.options[i].selected = true;
              } else {
                  theField.options[i].selected = false;
    </script>
    <!--- TOP --->
    <body>
    <div>
    <cfform name="SFORM" FORMAT="html"  width="1000" height="400" style="margin-left:140px;">
    <cfgrid name="UsersGrid"
               FORMAT="html"
               query="QNAMES" width="920" height="200" rowheaders="No" striperows="yes" striperowcolor="fefefe">
    <cfgridcolumn name="RANKING" width="40"header="Rank">
    <cfgridcolumn name="COMPANY" width="170" header="Company">
    <cfgridcolumn name="FIRSTNAME"  header="Contact Name">
    <cfgridcolumn name="POS" width="160" header="Position">
    <cfgridcolumn name="DEPARTMENTNOM" width="150" header="Department">
    <cfgridcolumn name="SECTORSNOM" width="120" header="Sectors">
    <cfgridcolumn name="ABUNDANCE" width="120" header="Action date">
    <cfgridcolumn name="SECTORS1" width="120" header="Action date" display="no">
    <cfgridcolumn name="PRICE" width="120" header="Action date" display="no">
    <cfgridcolumn name="PHONE" width="120" header="Action date" display="no">
    <cfgridcolumn name="EMAIL" width="120" header="Action date" display="no">
    <cfgridcolumn name="MOBILE" width="120" header="Action date" display="no">
    <cfgridcolumn name="ADDRESS" width="120" header="Action date" display="no">
    <cfgridcolumn name="CITY" width="120" header="Action date" display="no">
    <cfgridcolumn name="COMMENTS" width="120" header="Action date" display="no">
    <cfgridcolumn name="MTGT" width="120" header="Action date" display="no">
       </cfgrid>
    <!---FIRST--->
    <table width="880" class="stat" >
    <tr><td><cfoutput>#QNAMES.RecordCount# Companies</cfoutput></td></tr>
    <tr>
    <td>Company:<cfinput class="input" type="text" name="COMPANY" size="20" label="Company" required="yes"  bind="{UsersGrid.COMPANY}" ></td>
    <td>
    Sector:<cfselect class="input" name="SECTORS1" size="1" label="Sector" required="yes">
    <option></option><cfoutput query="industries"><option value="#SECTORSIDS#">#SECTORSNOM#</option></cfoutput></cfselect>
    </td>
    <td>Ranking:<cfinput class="input"  type="TEXT" name="RANKING" size="3" label="Ranking" bind="{UsersGrid.RANKING}" ></td>
    <td>Price:<cfinput class="input" type="TEXT" name="PRICE" size="3" label="Price" bind="{UsersGrid.PRICE}" >
    <a href="" id="myLink" target="_blank">Google</a>
    <a href="" id="Linkedin" target="_blank">Linkedin</a></td>
    </tr>
    <tr>
    <td>Department:<cfselect class="input" name="DEPARTMENT1" size="1" label="Department" required="yes">
    <option></option><cfoutput query="dNames"><option value="#DEPARTMENTIDS#">#DEPARTMENTNOM#</option></cfoutput></cfselect>
    </td>
    <td>Name:<cfinput class="input" type="text" name="FIRSTNAME" label="Name" required="yes" width="150" bind="{UsersGrid.FIRSTNAME}" ></td>
    <td>Position:<cfinput class="input" type="text" name="POS" label="Position" width="150" bind="{UsersGrid.POS}" ></td>
    <td>Phone:<cfinput class="input" type="text" name="PHONE" label="Phone" width="150" bind="{UsersGrid.PHONE}" ></td>
    </tr>
    <!--- THIRD--->
    <tr><td>Email:<cfinput class="input" type="text" name="EMAIL" label="Email" width="150" bind="{UsersGrid.EMAIL}" ></td>
    <td>Mobile:<cfinput class="input" type="text" name="MOBILE" label="Mobile"  bind="{UsersGrid.MOBILE}" ></td>
    <td>Address:<cfinput class="input" type="text" name="ADDRESS" label="Address"  bind="{UsersGrid.ADDRESS}" ></td>
    <td><cfselect class="input" name="CITY" width="80" size="1" >
    <cfoutput query="xity"><option value="#CITYID#">#CITYNOM#</option></cfoutput>
    </cfselect></td>
    </tr> 
    <!--- FOURTH --->
    <tr><td>Comments:<cftextarea class="input" name="COMMENTS" height="60"  label="Comments" bind="{UsersGrid.COMMENTS}" /> </td>
    <td>Action:<cfinput type="DateField" class="input" size="10" name="ABUNDANCE" label="Action"  bind="{UsersGrid.ABUNDANCE}" ></td>
    <td>Time:<cfselect class="input" name="MTGT" width="90" label="Time"><option>7:00AM</option></cfselect></td>
    <td><cfselect class="input" name="STATE1"  size="1" label="Action" >
    <cfoutput query="salesstep"><option value="#SALESID#">#SALESNOM#</option></cfoutput>
    </cfselect>  </td>
    <cfinput type="hidden" name="ENTID" label="ENTID" bind="{UsersGrid.ENTID}" >
    </tr>
    <tr> <td> 
    <cfinput type="submit" name="DELCOM" value="delete" class="button" >
    <cfinput type="submit" name="UPDATEADDBTN" value="UPDATE or ADD NEW" class="button"></td>
    </tr>
    </table>
    </cfform>
    <cfif isDefined("FORM.DELCOM")>
    <CFQUERY name="deletecompany" datasource="tester">
    DELETE FROM COMPANY
    WHERE ENTID = #FORM.ENTID#
    </CFQUERY>
    <CFLOCATION URL="testht.cfm">
    </cfif>
    </div>
    </body>
    </html>

  • CFSELECT and BIND

    Hi
    I'm trying out cfselect with bind for the 1st time and I'm
    having 1 issue...
    I am trying to populate the 2nd cfselect with the zone_names
    AFTER i have selected the country_name in the 1st cfselect.
    the 2nd cfselect isnt populating!
    My database looks like this...
    All the data is in 1 table.
    table name = zones
    columns = zone_id, country_name, zone_name
    My cfm page is fairly simple...
    <cfform name="myform">
    <table>
    <tr>
    <td>Select Media Type:</td>
    <td><cfselect name="country_name"
    bind="cfc:art.getCountries()"
    bindonload="true" /></td>
    </tr>
    <tr>
    <td>Select Art:</td>
    <td><cfselect name="zone_name"
    bind="cfc:art.getzones({zone_name})" /></td>
    </tr>
    </table>
    </cfform>
    I have also attached my CFC code.
    My code probably isnt too neat right now, due to me spending
    hours trying to get this right...
    However, I would really appreciate someones help so that my
    2nd cfselect populates correctly!
    Thanks in advance
    Delon

    Hi
    I'm trying out cfselect with bind for the 1st time and I'm
    having 1 issue...
    I am trying to populate the 2nd cfselect with the zone_names
    AFTER i have selected the country_name in the 1st cfselect.
    the 2nd cfselect isnt populating!
    My database looks like this...
    All the data is in 1 table.
    table name = zones
    columns = zone_id, country_name, zone_name
    My cfm page is fairly simple...
    <cfform name="myform">
    <table>
    <tr>
    <td>Select Media Type:</td>
    <td><cfselect name="country_name"
    bind="cfc:art.getCountries()"
    bindonload="true" /></td>
    </tr>
    <tr>
    <td>Select Art:</td>
    <td><cfselect name="zone_name"
    bind="cfc:art.getzones({zone_name})" /></td>
    </tr>
    </table>
    </cfform>
    I have also attached my CFC code.
    My code probably isnt too neat right now, due to me spending
    hours trying to get this right...
    However, I would really appreciate someones help so that my
    2nd cfselect populates correctly!
    Thanks in advance
    Delon

  • Cfselect and time

    Hello,
    I would like to get some tips on the best way to accomplish
    what I am trying. Obviously my method is not exactly working the
    way I wanted it too. I have select boxes for the user to enter the
    time. I just need some ideas on either a new method or a fix.
    <cfselect name="eventstarthour" id="eventstarthour" >
    <option value="" selected>Select Hour</option>
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    <option value="4">4</option>
    <option value="5">5</option>
    <option value="6">6</option>
    <option value="7">7</option>
    <option value="8">8</option>
    <option value="9">9</option>
    <option value="10">10</option>
    <option value="11">11</option>
    <option value="12">12</option>
    </cfselect>
    <cfselect name="eventstartminute"
    id="eventstartminute">
    <option value="" selected>Select Minute</option>
    <option value="00">00</option>
    <option value="30">30</option>
    </cfselect>
    I have this to set things up to be entered into a mysql db
    later, which works fine if the user actually selects a time, but
    fails if they do not select anything which is ok if they do not
    need to select a time as it will not always be necessary. I just
    need a way to handle when a user does not select a time, that field
    will just need to remain a NULL value.
    <cfif isdefined("form.eventstarthour")>
    <cfset Session.eventstarttime =
    '#form.eventstarthour#:#form.eventstartminute#'>
    <cfelse>
    <cfset Session.eventstarttime = "">
    </cfif>
    <cfif isdefined("form.eventendhour")>
    <cfset Session.eventendtime =
    '#form.eventendhour#:#form.eventendminute#'>
    <cfelse>
    <cfset Session.eventendtime = "">
    </cfif>
    What is a good way of handling user input of time? I thought
    about doing it this way, but I dont like how long the list would be
    once I added in the half hour options.
    <cfselect name="eventstarthour" id="eventstarthour" >
    <option value="" selected>Select Hour</option>
    <option value="1:00">1:00A</option>
    <option value="2:00">2:00A</option>
    <option value="3:00">3:00A</option>
    <option value="4:00">4:00A</option>
    <option value="5:00">5:00A</option>
    <option value="6:00">6:00A</option>
    <option value="7:00">7:00A</option>
    <option value="8:00">8:00A</option>
    <option value="9:00">9:00A</option>
    <option value="10:00">10:00A</option>
    <option value="11:00">11:00A</option>
    <option value="12:00">12:00P</option>
    <option value="13:00">1:00P</option>
    <option value="14:00">2:00P</option>
    <option value="15:00">3:00P</option>
    <option value="16:00">4:00P</option>
    <option value="17:00">5:00P</option>
    <option value="18:00">6:00P</option>
    <option value="19:00">7:00P</option>
    <option value="20:00">8:00P</option>
    <option value="21:00">9:00P</option>
    <option value="22:00">10:00P</option>
    <option value="23:00">11:00P</option>
    <option value="00:00">12:00P</option>
    </cfselect>

    An idea: Use hour, minute and the AM/PM flag

  • h:htmlCommandLink and onclick

    Is it possible that <h:htmlCommandLink> haven't onclick attribute
    What is reason (myfaces accept this tag) ?
    regards
    Haris Peco

    Note, JSF 1.2 spec does accept onclick for commandLinks - see https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=71 and http://java.sun.com/javaee/javaserverfaces/1.2_MR1/docs/renderkitdocs/HTML_BASIC/javax.faces.Commandjavax.faces.Link.html. Just remember to have the onclick JavaScript return true if you want the form to actually get submitted.

  • CFSELECT and Databases

    How should a CFSELECT be constructed so that the data entered
    in the fields textbox can be collected and inserted into the
    database?
    I have created two fields, one for Region and the other for
    Course. And then I have tried to collect the data for insertion
    into a database but in the case of the Region I get a "Region is
    not Identified" error and in the case of Course, I get the field
    returning an empty string.
    Please check the code and give me your insight on what I am
    doing wrong. TIA
    ps: Sorry for long code

    OK I think I understand your pages now. Try this:
    FORM PAGE CODE:
    <!--- make sure that it exists --->
    <cfif not isDefined("SESSION.registrationProfile")>
    <!--- if it does not exist, create and initialize it
    --->
    <cfset SESSION.registrationProfile = structNew()>
    <!--- define data that will be collected from the
    consumer, initially they
    will be blank --->
    <cfset SESSION.registrationProfile.region = "">
    <cfset SESSION.registrationProfile.regionNumber = "">
    </cfif>
    <!--- if students has entered data, remember the details
    --->
    <cfif isDefined("Form.eMail")>
    <cfset SESSION.registrationProfile.region =
    #FORM.Region#>
    <cfset SESSION.registrationProfile.regionNumber =
    #FORM.regionNumber#>
    </cfif>
    <!--- get courses list --->
    <cfquery name="getCourseList"
    datasource="#request.datasource#">
    SELECT CourseID, CourseName
    FROM Course
    </cfquery>
    <!--- Region List --->
    <cfquery name="getRegion"
    datasource="#request.datasource#">
    SELECT region
    FROM Address_Region
    ORDER BY Region ASC
    </cfquery>
    <cfselect name="Region" id="Region" query="getRegion"
    value="Region"
    display="Region" required="yes" message="Select associated
    region"></cfselect>
    <cfselect name="courseName" id="courseName"
    query="getCourseList"
    value="CourseID" display="CourseName" required="yes"
    message="Select the
    required course."></cfselect>
    RESPONSE PAGE CODE:
    <!--- get corresponding number for selected region in
    order to populate
    Student table --->
    <!--- Region List --->
    <cfquery name="getRegionNumber"
    datasource="#request.datasource#">
    SELECT regionNumber
    FROM Address_Region
    WHERE region = '#FORM.Region#'
    </cfquery>
    <!--- end of getRegionNumber --->
    <!--- Save registration information --->
    <cftransaction>
    <cfquery datasource="#request.datasource#">
    INSERT INTO Student
    (eMail, FirstName, LastName, DOB, RegistrationDate)
    VALUES(
    '#FORM.eMail#',
    '#FORM.firstName#',
    '#FORM.lastName#',
    #CreateODBCDate(FORM.dob)#,
    #CreateODBCDate(Now())#
    </cfquery>
    <!---
    <cfquery datasource="#request.datasource#">
    INSERT INTO Student_Address
    (Email, Address1, Address2, City, RegionNumber, Phone, Other)
    VALUES
    '#FORM.eMail#',
    '#FORM.address1#',
    '#FORM.address2#',
    '#FORM.city#',
    '#FORM.RegionNumber#',
    '#FORM.phone#',
    '#FORM.other#'
    </cfquery>
    --->
    <cfquery datasource="#request.datasource#">
    INSERT INTO Course_Registration
    (Email, CourseID)
    VALUES(
    '#FORM.eMail#',
    '#FORM.courseID#'
    </cfquery>
    </cftransaction>
    And once again, if you code the <cfselect> like I coded
    it you do not need
    teh <cfoutput> inside the
    <cfslect></cfselect>
    Ken Ford
    Adobe Community Expert - Dreamweaver
    Fordwebs, LLC
    http://www.fordwebs.com
    "Abdlah" <[email protected]> wrote in
    message
    news:[email protected]...
    > Ken,
    > thanks for the explanation. I thought various surfers
    may specialize in
    > certain areas.
    >
    > To answer your question, I have a form that submits to
    another page. The
    > code
    > in my processing page is as follows:
    >
    > <!--- get corresponding number for selected region in
    order to populate
    > Student table --->
    > <!--- Region List --->
    > <cfquery name="getRegionNumber"
    datasource="#request.datasource#">
    >
    > Select regionNumber
    > From Address_Region
    > Where region ="#Form.Region#"
    >
    > </cfquery>
    >
    > <!--- end of getRegionNumber --->
    >
    > <!--- Save registration information --->
    > <cftransaction>
    > <cfquery datasource="#request.datasource#">
    > Insert into Student(eMail,
    > FirstName,
    > LastName,
    > DOB,
    > RegistrationDate)
    > Values('#(Form.eMail)#',
    > '#(Form.firstName)#',
    > '#(Form.lastName)#',
    > #CreateODBCDate(Form.dob)#,
    > #CreateODBCDate(Now())#)
    > </cfquery>
    >
    > <!---cfquery datasource="#request.datasource#">
    > Insert into Student_Address(Email,
    > Address1,
    > Address2,
    > City,
    > RegionNumber,
    > Phone,
    > Other)
    > Values('#(Form.eMail)#',
    > '#(Form.address1)#',
    > '#(Form.address2)#',
    > '#(Form.city)#',
    > '#(Form.RegionNumber)#',
    > '#(Form.phone)#',
    > '#(Form.other)#')
    > </cfquery> --->
    > <cfquery datasource="#request.datasource#">
    > Insert into Course_Registration(Email,
    > CourseID)
    > Values('#(Form.eMail)#',
    > '#(Form.courseID)#')
    > </cfquery>
    >

  • JDev 9.0.3. : JBO Event and "OnClick" attribute" can work together ?

    Hi,
    I've a JSP page developed by JDeveloper 9.0.3, with a checkbox item:
    <input name="pluto" type="checkbox" value="1" onClick="" />
    I need to execute some transactions on db everytime "pluto" is checked or uncheked. I'd like to handle this by a JBO Event, is it possible?
    I know that I could use javascript to handle the "OnClick" event, but how can execute insert statement on db using the same connection already defined in my JSP application?
    Thanks in advance.
    Nunzio

    Repost

  • Is possible to use href= and onclick=Ajax.request to track outgoing link?

    Hi,
    I´m new in Oracle Apex and i'm trying now to track outgoing links on my Apex 3.2.1 application.
    When the user clicks on a link of my application that redirects to an outgoing site, I want them to be taken to the site (href) and I also want a background script that register in a oracle table this "click".
    For example, i have this link in an APEX page:
    When user cliks in this link, i would like to execute in background an oracle procedure, with a parameter. Let´s call this procedure, for example:
    SP_REGISTRA_ACESS_LINK(:P19_COD_TOPICO).
    This procedure insert a record in a table called BAC_ACESS, storing in it the SYSDATE and the value of ":P19_COD_TOPICO".
    Is it possible to link to a new site and call an AJAX request at the same time?
    Could some one give me a example of how i can do it? How i can implement it in my Apex 3.2.1 application?
    I´m working with Apex 3.2.1 and RDBMS 9i. I can not upgrade none of these releases, cause Apex is installed in a production database that can be upgrade now to 10g/11g.
    Best regards,
    Sergio Coutinho

    Jari,
    Very interesting. I didin´t know that this APEX_UTIL exists...
    Although that, i developed a customized access control to specific "media itens" of my application, for example:
    - Download of documents or programs;
    - Play of videos;
    - Play of audios;
    - Acess of CLOB records of a table, that were displayed as a kind of HTML page;
    - Outgoing links;
    I do not want to control all the Apex application as, for example, tabs, report pages, charts, forms, etc.
    All these media itens are stored on oracle tables, and where displayed in apex reports. Customer clicks on a link of this report and the media is displayed to the user.
    I have sucess to control quite all the medias display.
    The only one i could not have success to control are these outgoing links. These links were stored in a oracle table and were displayed in a apex interactive report.
    I would like to know if i can implement my custom rutine to register these access. I think that i could to it with Ajax scripts.
    Best regards,
    Sergio Coutinho

  • Cfselect and cfloop help

    I am working on an event calender application. What I am
    trying to achieve is to have 2 drop down lists with the months of
    the year in them. I want the selection from the first list field to
    define the starting point for the second list field. For example.
    The first choice from the 12 months is March. So I want the second
    box, located on the same page, to have from March to December as
    options. Then there is a submit button.
    Then, below, on the same page, I would like to have a dynamic
    calender generated for the events between the months selected from
    the form. I have the calender section completed using a db query to
    populate the table with the events.
    I can get this to mostly work by having the form on one page
    submit to the calender on another page though I cannot get the
    second list field to update based on the value passed from the
    first list field, I would really like this to work on a single page
    so that the user can resubmit different date combinatons on the
    fly.
    Any help anyone can provide me with would be greatly
    appreciated. Thanks in advance.

    Ok..i have the page working almost completely right now.
    I used IsDefined("Form.Submit"> in a <CFIF>
    <CFELSE> statement to get the form to submit the results to
    the same page, then i added a second copy of the form to the top of
    the reselts section of the calender so that the form is always
    present for use on the page.
    The only thing I need help with now is making the second list
    box update it's choices from the selection of the first list box in
    the same form. Any ideas?
    I can post code iff it will help any, but it is getting
    rather lengthy.

  • Get canvas.toDataURL('image/jpeg') and convert base64 encoding to java.sql.Blob

    Convert canvas.toDataURL('image/jpeg') to java.sql.Blob.
    I am using oracle adf so I am able to action a backing bean from javascript and pass in parameters as a map. I pass in the canvas.toDataURL('image/jpeg') which I then try to decode in my bean. Using BASE64Decoder and the converting the bytearray to a file I can see the image is corrupted as I can't open the file thus converting the bytearray to blob is also a waste.
    Has anyone any ideas on base64 encoding from canvas.toDataURL to file or Blob?

    Use Case:
    A jsf page that enables a user to take photos using the HTML5 canvas feature - interact with webcam -, take photos and upload to profile
    1. I have created the jsf page with the javascript below; this pops up as a dialog and works okay and onclick an upload image, triggers the snapImage javascript function below and sends the imgURL parameter to the serverside managedbean
    <!-- java script-->
    function snapImage(event){
                    var canvas = AdfPage.PAGE.findComponent('canvas');
                    AdfCustomEvent.queue(event.getSource(),"getCamImage",{imgURL:canvas.toDataURL('image/jpeg'),true);
                    event.cancel();
    <!-- bean -->
    public void getCamImage(ClientEvent ce){
    String url=(String)ce.getAttributes().get("imgURL");
    decodeBase64URLToBlob(url);
    private BlobDomain decodeBaseB4URLToBlob(String url64){
                    BASE64Decoder de=new BASE64Decoder();
                    byte[] bytes=de.decode(url64);
                    File file=new File("abc.jpg");
                    InputStream in = new ByteArrayInputStream(bytes);
                    BufferedImage bImageFromConvert = ImageIO.read(in);
                    in.close();
                    ImageIO.write(bImageFromConvert, "jpg", file);
                    return createBlobDomainFromFile(file);
    ----problem---
    Accessing the generated jpeg file shows the image is corrupted, probably missing bytes or encode/decoder issues.and the blob image after uploading to database is saved as a binary stream which ondownload doesnt render as an image or anything i know of.
    Is there anyways of achieving the conversion without errors?

  • Can the delimiter in a CFSELECT-multiple be changed before using the list it creates?

    I am using a CFSELECT which allows multiple selections, and I
    am feeding the results into a query which returns information about
    all of the selections. However, some of the values being returned
    contain commas because the values are company names (Acme, Inc.)
    and this conflicts with the comma-delimiting being looked for by
    the ListQualify I am using in the query to look up the information
    based upon the selections.
    Is there a way to change the delimiter of either the CFSELECT
    or the list it generates? I have tried ListChangeDelims before the
    query, but it changes both the delimiter commas and the value
    commas, obviously. I don't believe there is a way to change the
    delimiter commas between creating the list in the CFSELECT and
    using it in the ListQualify, but there are so many of you CF
    geniuses out there, one of you has to know how to do this.
    I am happy to provide more information or attempt to clarify
    a point upon request.
    My thanks in advance for your consideration and help,
    Jim

    Thank you for the suggestion, Dan. I wish it was that simple.
    I am working with a table in which the company name is entered for
    each record and has no link to any other table, there is no company
    table. I could create a company table and switch-out the company
    name with it's new id, but I'd rather not have to change several
    thousand records. Plus, with new records being added all the time,
    how would the users enter company names if the names aren't already
    in this new table?
    The point may be moot, in addition, as there are numerous
    scenarios in which one may have a field that contains commas for a
    number of reasons. Regardless of why the commas are used, the fact
    that they can be used is important and what needs to be addressed.
    Is there a way to leave the commas in the records and change the
    delimiter put in the list?
    Thanks again,
    Jim

Maybe you are looking for

  • Net Book Not Responding

    I have a Net Book NB 255-N250. I've had it for a little more than a year now and it has always preformed well. But in the last few months whenever I start a program, Internet explorer for example, The window will pop up and it will say Not Responding

  • Stop network home from being created and shared on login

    I have successfully set up a OD server bound to Active Directory. I have the shares set up exactly how I want them - except - I don't want network users to have their home folder automatically created. I am only using AD for authentication and not ne

  • Corrupt LR Catalog!(?)

    I´ve got 133.300 picture on a 2 TB HD. The catalog is on my laptop. Some of my pictures are only to be seen in the Library mode. When I go to Developent mode I´m told, that "The folder could not be found" The píctures are counted in the keyword list.

  • Installing DeskJet 970 CSe over network to Win 7 64-bit system

    My deskjet 970Cse is hard connected to our desktop running Windows XP Pro. I just bought a new laptop running Windows 7 64-bit. I was able to install the printer connecting the USB cable to the laptop without a hitch, however, I can't install it over

  • Running SOLMAN_SETUP

    I have installed Solution Manager 7.0 EHP1, setup the SAP GUI to connect to the system. I believe the next step is to run SOLMAN_SETUP basic configuration. In oder to do this do i need to create a user? At the moment when i open the SAP GUI and conne