Javascript event (onchange) for af:selectOneListBox ...

Hi,
When using <af:selectOneListbox> with autosubmit on, an onchange event is generated in the generated HTML:
<select size="3" class="x6" onchange="_adfspu('_id8',1,'selectedTypeList','selectedTypeList');return true;" name="selectedTypeList" id="selectedTypeList">...</select>
Is it possible to modify the <af:selectOneListBox> to generate an ondblclick event too?
What I an trying to do is to use the single click for some action (display info in another box) and to use the double click to remove the current selected item from the listbox.
Thanks,
Eric

William,
Set autoSubmit="true" and use a valueChangeListener.
John

Similar Messages

  • How to write an JavaScript Event Handler for Portal Form?

    I have created an form in Portal builder.
    There are two column, R04 and R05.
    I need to use Javascript Event Handler to check if R04 value is smaller than R05 value.
    Can I be able to build up this function?
    Can anyone give me a hint? or steps?
    Thanks

    Here are some suggestions.
    1. do what we did, and write your own protocol server that understands whatever custom commands you need, and then write a custom thin client which will send commands to and receive responses from this protocol server. you can use any language for the client software. the protocol server should be written in java so that it can receive commands from the client and then use the 9iFS API to execute the requests or retrieve the data that the client wants to display.
    2. write a custom fat client, in java, that accesses the 9iFS API directly. this means that each client will be accessing the iFS schema on the database machine directly. if you configure the iFS service on the client to use the THIN driver, then you won't need to install the Oracle client software on the client machine. You'll just need all the iFS .jar files and the database's JDBC driver (classes12.zip). Note that using the THIN driver is not supported because of bugs and performance problems. If you use the OCI8 driver, which is supported, then you'll have to install the whole Oracle client software package on the client machine.
    3. write a thin client that uses the WebDAV protocol, and communicate with our built-in DAV server. this approach will allow you to execute any command that DAV understands. you may be able to find some free HTTP or DAV client software on the net, or you can try writing it yourself. this is probably a better solution than number 1 unless you really need to send custom commands that are not in our DAV server's vocabulary.

  • Javascript events - onchange toggle forms

    Hi, below is where im at now. Ive got my JS toggling on and
    off a form from any selection below. Allt he options below turn on
    the same form. My problem is that i dont understand how to make the
    option "Estate Agent" toggle on/off a different form. Could anyone
    offer some please help? tar
    <select name="select" id="select"
    onchange="javascript:showForm(this.value, servdetails);">
    <option value="0">Select...</option>
    <option value="1">Architect</option>
    <option value="2">Caterer</option>
    <option value="3">Estate Agent</option>
    <option value="4">Garden/Landscape
    Designer</option>
    <option value="5">Interior Designer</option>
    <option value="6">Surveyor</option>
    <option value="7">Structural Engineer</option>
    <option value="8">Solicitor</option>
    <option value="9">Vet</option>
    <option value="10">Other professional</option>
    </select>

    hi,
    Please follow the suggestions for Saving a form:
    // Saving the form is done at the application level, so you need to invoke the
    Acrobat app model.
    App.executeMenuItem("SaveAs"); // The end user will be prompted to specify a
    file name.
    // However, you must save the form silently if the form needs to be certified
    and the certificate must be trusted for privileged JavaScript.
    var mydoc = event.target;
    mydoc.saveAs();
    Thanks,
    kris

  • How to call a jsp function on a java script event 'onchange'

    hi all,
    i m in trouble, iwant to call a jsp function on occurance
    of a javascript event onchange
    actully i want to refresh my one text field at every change
    in a select option of a form
    plz tel me any othr method if i m wrong.
    thnx in adv.

    as the form submition is a POST operation u can use some
    if{} else{} construct to handle this. u can check the value of some POST variable to identify whether its the first loading or refresh. got it
    regards
    aleens

  • How convert to mobile...eg apply touch where as exist click event(mainly for javascript or jQuery, w

    I built a tinyStickyNotes App and works in PC browsers, how convert to mobile...eg apply touch where as exist click event(mainly for javascript or jQuery, well needed develop two versions of my App  mobi/PC?)?
    Really needed this or phone gap do the job?
    a phone gap book includes what needed change (in this case) or look for a ...?... Book?
    Also, not needed registered as phone gap user 9.99/mo if I am adobe creative cloud member, that's correct? yes correct / no needed
    Cloud file drive(file explorer win or mac), may installed and in my computers not have creative cloud apps on them?

    absolutely. Being that there will be no touch events via the mouse and mouse events via the touch screen, the two should not conflict with one another.  In the future css specifications, there will be something called touch points which will handle the events no matter the input.

  • Documentation for JavaScript event handlers

    Hi!
    Can someone tell me where(link) could I find documentation or
    examples for JavaScript event handlers.
    THANK YOU!

    There are realy many javascript resources on the web. These are
    2 of them:
    http://www.webdevelopersjournal.com/JavaScriptWeenie.html
    http://www.tech.irt.org/articles/js058/
    Hi!
    Can someone tell me where(link) could I find documentation or
    examples for JavaScript event handlers.
    THANK YOU!

  • JavaScript events

    How can I use javascript events with ADF Faces components 11

    This is not possible as the framework is based on JSF, which at its core is a server-side framework. ADF Faces RC provides some facilities for JavaScript events, but these are a complement not a replacement for server-side events.
    Regards,
    ric

  • Integrate javascript event into Oracle ADF Components

    Can someone show me how to use javascript attribute, for instance onclick, in CoreCommandButton? How do we normally integrate javascript event into Oracle ADF Components?

    Hi,
    you already have a link. Its not an Oracle project but a project of Wilfred from Eurotransplant. Feel free to ping him directly on this or ask this question on the Forms forum, if you haven't already, where he most likely is signed up for.
    Frank

  • Javascript event handling

    The following code is being executed three times in the
    following sequence:
    1) On initialization of my Flex application, initCallback()
    is called
    2) When I broadcast a 'getUserPreferencesFromCookie' event,
    handleGetUserPreferenceCookie() is called.
    3) When I broadcast a 'writeUserPreferencesCookie' event,
    handleWriteUserPreferenceCookie() is called.
    // Callback when flash is initialized
    var initCallback = function()
    // Add all event listeners
    FABridge.flash.root().getPreferences().addEventListener(
    "getUserPreferencesFromCookie",
    handleGetUserPreferenceCookie);
    FABridge.flash.root().getPreferences().addEventListener(
    "writeUserPreferencesCookie",
    handleWriteUserPreferenceCookie);
    FABridge.flash.root().getPreferences().faBridgeInitialized();
    // Listen for flash initialization (i.e. the Main application
    is created)
    FABridge.addInitializationCallback("flash", initCallback);
    // Event handler for Get User Preferences Cookie Events
    events
    var handleGetUserPreferenceCookie = function(readEvent)
    alert("Getting Cookie for user: " +
    readEvent.getUsername());
    if (readEvent.getUsername())
    var theCookie = readCookie(readEvent.getUsername());
    alert("Returned from readCookie: '" + theCookie + "'");
    var preference = FABridge.flash.root().getPreferences();
    if (preference)
    if (preference.setPreferenceCookie)
    preference.setPreferenceCookie(theCookie);
    else
    FABridge.flash.root().getPreferences().setPreferenceCookie(null);
    // Event handler for Write User Preferences Cookie Events
    events
    var handleWriteUserPreferenceCookie = function(writeEvent)
    alert("Creating Cookie for User");
    if (writeEvent)
    alert("Write event is defined");
    var username = writeEvent.getUsername();
    if (username)
    // Create a cookie given the username and the XML
    createCookie(writeEvent.getUsername(),
    writeEvent.getData());
    alert("Returned from creating cookie");
    else
    alert("Write event is undefined");
    alert("Write cookie method completed");
    Here is the problem:
    handleGetUserPreferences() completes as expected (i.e. the
    cookie string is set into my preferences object). The readEvent is
    a custom event that extends flash.events.Event. However, when
    writeUserPreferenceCookie is called, the line
    writeEvent.getUsername() fails. writeEvent is the same type of
    event as readEvent. And when I say 'fails' I mean that the method
    goes no further. I never see the 'Write cookie method completed'
    alert. There are no errors in the Javascript Error Console.
    I've checked the writeEvent on the action script side. The
    username has been set into the event the same way that it was set
    into the readEvent. I cannot see why I can get data out of the
    readEvent but not the writeEvent.
    ANY help would be much appreciated.
    -Julie

    Just because the forums are a little slow on a weekend...
    JavaScript functions should be declared in the HEAD of an HTML page. I wasn't aware that a function declared in the BODY writes to a new document, so I've also learned something out of this.
    Take this and work on it to place the output where you want it:<html><head><script type="text/javascript"><!--
      function clickfunction()
        //if (registration.purpose[0].checked==true)
          document.getElementById("stuffHere").innerHTML = "Name of School/ College: <input type=text name=sname><br>Grade / Year:<input type=text name=grade>";
    !--></script></head>
    <body>
      <table>
        <tr>
          <td><font size = "" color="purple">Age:</font></td>
          <td><input type = "text" name = "age" size = "10" maxlength = "3"></td>
        </tr>
        <tr>
          <td><font size = "" color = "purple">Select the best reason
            <br>to use the Library:</font></td>
          <td><input type = "radio" name = "purpose" value = "school" onClick = "clickfunction()">
            <font size = "" color = "purple" >School / College</font><br>
              <input type = "radio" name = "purpose" value="work">
                <font size = "" color = "purple">Work</font><br>
              <input type = "radio" name="purpose" value="personal">
                <font size = "" color = "purple">Personal</font>
          </td>
          <!--// SET AN ID ON THE ELEMENT! //-->
          <td id="stuffHere"></td>
        </tr>
      </table><br>
      <form>
        <input type="Submit" name="register" value="Register" align="MIDDLE">
        <input type="reset" name="clear" value="Clear Form" align="MIDDLE">
      </form>
    </body></html>db
    -- next time, no JavaScript questions, please!
    edit What you wanted to do was<div id="div1" style = 'display:none;'>and in the functiondocument.getElementById("div1").style.display = "block";Edited by: Darryl.Burke

  • Portal Forms (9ias) JavaScript Event Handlers

    For each form field it is possible to write event handlers in Javascript e.g OnFocus
    //On BLUR effectively prevents the field from ever gaining
    //focus.
    this.blur();
    There are no PL/SQL event handlers at field level. Is there any way that we can call PL/SQL code from the Javascript event?
    Thanks in Advance.

    In case of do_event(), you can do a view source of the form's runtime page and lookup the code. It's a simple javascript that set values to some hidden variables.
    When you do a view source , you will find some javascripts like :-
    <SCRIPT TYPE="text/javascript" SRC="<some-url>">
    Copy the url and paste it on a new browser window and try to access it. In case of IE, it will prompt you for a file download. Download the file as a text file and you will get to see the code.

  • Handling Custom JavaScript Events from HtmlLoader Class

    Hey guys, just a quick question, Is it possible to handle custom javascript events just the way standard events like locationchange and DOMInitialized are handled. Say for example a HTML5 slide application that dispatches custom events when the user moves from one slide to another. I know there is an option to use ExternalInterface to talk to AS3 but for this project of mine, this is not an oiption as this HTML5 Presentation doesnt have any swf content to bridge with.
    Its just a thought since the HTMLloader has access to the javascript window object(or am i wrong). Would it be possible to access a custom function as a prototyped property of the window Object.
    Any form of tip/clarification will be appreciated.
    thanks!

    Use the HTMLHost class. You create a subclass of HTMLHost and override certain methods that are called in response to certain JavaScript behaviors. Then you assign an instance of your HTMLHost to the HTMLLoader's htmlHost property. (Since you're using the Flex HTML component, you would assign your HTMLHost subclass instance to the HTML control's htmlHost property.)

  • How to work with event onChange ADF af:InputField

    Hi people..
    I´d like to know if is possible to execute a java after the user type any value in a af:InputText, like event onChange in javascript
    What I need is when a user type a value in a af:InputText, a specific method is executed getting values to others fields.
    Is that possible?
    Thanks Willlian

    William,
    Set autoSubmit="true" and use a valueChangeListener.
    John

  • Load rdlc report in reportviewer on javascript Event

    Can I Load RDLC report to ReportViewer  in Run Time on javascript event.
    protected void Page_Load(object sender, EventArgs e){
    if (Request.QueryString.Count == 0){//Request from Client-side (Javascript event)
    if (Request["HTTP_X_REQUESTED_WITH"] == "XMLHttpRequest"){
    ReportViewer1.ProcessingMode = ProcessingMode.Local;
    ReportViewer1.LocalReport.ReportPath = Server.MapPath("Reports\\Report2.rdlc");
    ReportViewer1.Visible = true;
    StreamReader str = new StreamReader(Request.InputStream);
    String strbuf = str.ReadToEnd().Normalize();
    QSerializer ser = new QSerializer();
    QCriteria Cri = ser.DeSerialize<QCriteria>(strbuf);
    if (!String.IsNullOrEmpty(Cri.Name))
    SqlDataSource1.SelectCommand = "select * from ZClient.TItem where ClientNx = 3";
    ReportViewer1.DataBind();
    ReportViewer1.LocalReport.Refresh();

    Hi Devgen,
    In my opinion, this thread is related to Report Control forum. So please post thread on that forum for more effective response. Thank you for understanding. Please refer to the following link.
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=vsreportcontrols.
    Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Submit a onchange attribute in selectOneListbox?

    Hi guys,
    I need to use javascript to submit an onchange attribute in selectOneListbox
    <h:selectOneListbox styleClass="selectListBoxStyle" value="#{postingStep1Form.selectedCategoryId1}" valueChangeListener="#{postingStep1Form.onSelectCategoryValueChange1}" id="categoryId1" onchange="myfunction(this);" required="false">
    <f:selectItems value="#{postingStep1Form.categorySelectItems1}" id="categorySelectItem1"/>
    </h:selectOneListbox>
    <script type="text/JavaScript">
    function myfunction(form)
    var mysel =document.forms['postingStep1JSFForm'].elements['postingStep1JSFForm:categoryId1'];
    var seltxt = mysel.options[mysel.selectedIndex].text;
    form.submit();
    </script>
    But what I got is an 'undefined' javascript error. Please help, Thanks !
    regards,
    Mark

    If you change your Javascript function like this, it should work:
    <script type="text/JavaScript">
    function myfunction(sel)
    var seltxt = sel.options[sel.selectedIndex].text;
    sel].form.submit();
    </script>Of course, you're not doing anything with that seltxt variable. Did you mean to? If not, you could just say onchange="this.form.submit();"

  • Unable to get automatic event handling for OK button.

    Hello,
    I have created a form using creatobject. This form contains an edit control and Search, Cancel buttons. I have set the Search buttons UID to "1" so it can handle the Enter key hit event. Instead its caption changes to Update when i start typing in the edit control and it does not respond to the Enter key hit. Cancel happens when Esc is hit.
    My code looks like this -
    Dim oCreationParams As SAPbouiCOM.FormCreationParams
            oCreationParams = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)
            oCreationParams.UniqueID = "MySearchForm"
            oCreationParams.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Sizable
                    Dim oForm As SAPbouiCOM.Form = SBO_Application.Forms.AddEx(oCreationParams)
    oForm.Visible = True
    '// set the form properties
            oForm.Title = "Search Form"
            oForm.Left = 300
            oForm.ClientWidth = 500
            oForm.Top = 100
            oForm.ClientHeight = 240
            '// Adding Items to the form
            '// and setting their properties
            '// Adding an Ok button
            '// We get automatic event handling for
            '// the Ok and Cancel Buttons by setting
            '// their UIDs to 1 and 2 respectively
            oItem = oForm.Items.Add("1", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
            oItem.Left = 5
            oItem.Width = 65
            oItem.Top = oForm.ClientHeight - 30
            oItem.Height = 19
            oButton = oItem.Specific
            oButton.Caption = "Search"
            '// Adding a Cancel button
            oItem = oForm.Items.Add("2", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
            oItem.Left = 75
            oItem.Width = 65
            oItem.Top = oForm.ClientHeight - 30
            oItem.Height = 19
            oButton = oItem.Specific
            oButton.Caption = "Cancel"
    oItem = oForm.Items.Add("NUM", SAPbouiCOM.BoFormItemTypes.it_EDIT)
            oItem.Left = 105
            oItem.Width = 140
            oItem.Top = 20
            oItem.Height = 16
            Dim oEditText As SAPbouiCOM.EditText = oItem.Specific
    What changes do i have to make to get the enter key to work?
    Thanks for your help.
    Regards,
    Sheetal

    Hello Felipe,
    Thanks for pointing me to the correct direction.
    So on refering to the documentation i tried out a few things. But I am still missing something here.
    I made the following changes to my code -
    oForm.AutoManaged = True
    oForm.SupportedModes = 1 ' afm_Ok
    oItem = oForm.Items.Add("1", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
            oItem.Left = 5
            oItem.Width = 65
            oItem.Top = oForm.ClientHeight - 30
            oItem.Height = 19
    oItem.SetAutoManagedAttribute(SAPbouiCOM.BoAutoManagedAttr.ama_Visible, 1, SAPbouiCOM.BoModeVisualBehavior.mvb_Default)
            oButton = oItem.Specific
            oButton.Caption = "OK"
    AND
    oForm.Mode = SAPbouiCOM.BoFormMode.fm_OK_MODE
    oItem = oForm.Items.Add("1", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
            oItem.Left = 5
            oItem.Width = 65
            oItem.Top = oForm.ClientHeight - 30
            oItem.Height = 19
    oItem.AffectsFormMode = False
    I get the same behaviour OK button changes to update and enter key does not work.
    Could you please tell me find what is it that i am doing wrong?
    Regards,
    Sheetal

Maybe you are looking for