How to submit commandLink using onkeypress event?

Hi all,
I have problem in submitting a commandLink using onkeypress event.
Assume a <h:inputText/> along with a cmdLink for searching by key
words.I tried the following code inorder to submit cmdLink.
My Code :
<script>
function setClick(event)
     var key;
     if(window.event)
     key = window.event.keyCode;
     else
     key = event.which;
     if(key==13)
                         document.forms['SummaryForm']['SummaryForm:_idcl'].value='SummaryForm:asinFilterSubmit'; document.forms['SummaryForm'].submit(); return false;
</script>
<h:inputText id="asinFilter"
          value="#{inventoryVisualBean.inventoryPageBean.asinFilter}"
                                   onkeypress="setClick(event)"/>
<h:commandLink id="asinFilterSubmit" action="#{inventoryVisualBean.search}">
</h:commandLink>          
so the above code will perform the search by keyword while pressing enter
key,its working well in IE browser,but in mozilla browser the input field
always retains the first character of keywords while selecting a keyword using keyboard and hitting enter key.
i.e:
v
vocab
vive
are the keywords,if choose vocab keyword using keyboard and hit enter key,the search results are produced only for the character ' v ' not for ' vocab ' because the input keyword ' vocab ' gets changed as ' v ' in the input text
while pressing enter,its working fine in IE.
can any one help me out?
Pls dont suggest onkeyup instead of onkeypress as i my requirement does not allow it.
Thanks in advance,
sundar.

This would work with plain html and javascript:
http://www.galileocomputing.de/openbook/javascript/javascript15.htm : Chapter 15.1.5.
The handleevent javascript method can be used to redirect events.
Maybe you can pretty much use the same with JSF. You have to getElementById, deriving the link element, and call the handlevevent method on it. Give it a try :)

Similar Messages

  • How Configuring Channel to use Mail Event Generator with a "String" Message

    Hello,
    I would like use a Mail Event Generator to receive String message.
    The BEA example is :
              <channel name ="SampleEGEmailChannel" messageType="xml"           qualifiedMessageType="oagpo:PROCESS_PO_007"           qualifiedMetadataType="eg:EmailEventGenerator"/>
    How change this example to accept messageType="string" ?
    Thanks for your help !!

    Thank you for your help :-)
    In fact I try to use messageType="string" and try to remove the qualifiedMessageType (but to uses Email Generator you must keep qualifiedMetadataType attributes ) and It has not worked.
    Why ? Because I haven't restarted the server.
    Conclusion: When you have problem, think to restart integration server !!

  • How to debug FM used in event type linkage?

    Hi experts,
    I have actived below linkage by tcode SWETYPV.
    BO BUS2032  ALECREATED    ,
    and I find the Receiver Function Module is PUR_ORDER_CREATE_VIA_SD_EVENT, can we debug this function module?
    Thank you in advance.
    Richard

    Hi Richard,
    Can you give us  more details about the issue?
    Actually we cannot debug the receiver function module when the event is occured. The reason is, its a background process.
    As far as i know, its not possible to debug the receiver function module.
    To check the event trace, use the transaction SWEL. It will show you whether the action triggered the event or not?
    Thanks,
    Viji.

  • Associating two events with submit button using  javascript in jsp

    Hi
    How can i Associate two events with submit button using javascript in jsp. Firstly it should insert the data to database and secondly it should close the same pop-up window

    Have something like :
    <input type="submit" name="submitbtn" value="Click me" onClick="function1(); function2(); " />
    You just call both functions sequentially, it's that simple. Although using javascript to work with a database, that seems a bit tricky.

  • How to change behavior of Select tag onKeyPress event

    I am populating a netui:select dropdown with a list of around 1200 items. Since it is so long, I would like to allow the user to type in the box to get close to their selection. Right now, the default behavior is to allow only one character to be typed to locate an item.
    I would like to change the behavior so that when the user quickly types three characters (or more), it matches the selection to the three that they typed. It seems to be firing on the onKeyPress event. Is there anyway to modify this?

    Hii,
    I am unable to understand exactly wat you want.
    But for free amount of lines : Keep that text under LOOP. Right click on template or window and create a loop and under that loop keep the text ,you can get many lines. or the given below point plzz follow.
    1,Use SO10 Tcode to write standard text in Smartform.
    2.For long text
    method1
    Create TEXT node- general attributes change text type to include text
    then you can input text name/text object/text id/language
    method2
    create PROGRAM LINE node - use FM READ_TEXT to read it to a internal table
    then use LOOP or TABLE node to display it
    For TEXT module(For foreign language)
    Tr-code:smartforms -- choose Text module(not choose form)--create a text module object
    then enter smartform Create TEXT node- general attributes change text type to text module
    input the text module name which created by above
    3.
    1. take function module name of the smartform.
    2. goto se37 and type that fm name.
    3. goto attributes tab
    4. double click on either program or include .
    5. There u can find all the subroutines used inside smartform.
    6. search for "perform %move using %textkey-name".
    4.Standard Texts are created in SO10 Tcode and stored in STXH table with OBject ,ID and NAME parameters. We can use Read_Text FM to read the text.
    check the tables STXH & STXL.
    5.
    How to CAll Standard Text in Smart Forms
    In SFs you can insert the standard tests using the TEXT node. Create a TEXT NODE. Then in the GENERAL ATTRIBUTES of this TEXT node select INCLUDE TEXT in the TYPE option. Then you have to enter the text name, object , ID and language in the provided fields. Then if you dont want any error if there is no text in the corresponding text then CHECK the check box "No errors if no text available.

  • How to trigger applet's EVEN_FORMATTED_SMS_PP_ENV  event using kannel?

    How to trigger applet's EVEN_FORMATTED_SMS_PP_ENV event using kannel?

    It seems that the freeze can be atributed to a problem with the limited number of proactive handlers and reentrance problem.
    I see this comment
    How to deal with re-entrance?
    · Requiring an SMS-Submit
    Can be used only: if the application has to send proactive commands only when
    triggered by EVENT_FORMATTED_SMS_PP_ENV.
    The remote server must require a response packet using SMS-Submit when sending a
    message to the application (the card shall implement the 3GPP 43.019 Rel-5)
    Advantages:
    o it is a standard mechanism
    o there is no need to implement anything related to this mechanism in the
    application
    How can I do that? Do I have to tinker the SMSC service and arrange for something like this?

  • How do I use the event.target.name String with an external dispatchEvent?

    ...I hope the title question makes sense...
    On my stage I have an externally loaded SWF with a button. When clicked the button dispatches an event to the main stage.
    On the main stage a listener then loads an SWF into a loader called gallery.
    The gallery loader is also being shared by buttons on the main stage which use the event.target.name String to call in SWFs with corresponding names.
    I am using Tweens to fade-out and -in content to the gallery when a button is pressed.
    Loading the SWFs was working until I tried to create a universal button function for the dispatchEvent buttons...
    The problem I have is that I don't know how to define the String to tell the newSWFRequest where to find the SWF when triggered by the external buttons.
    (I may be doing this all wrong... but figured the best way to load an SWF on to the main stage from an external SWF was by using dispatchEvent??)
    My code triggers the Event and the gallery loader fades out, but then it cannot find the new SWF:
    Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.
    Please can someone help me understand the way to make the String point in the right direction? (I think the only errors are in bold below)
    Code:
    var myTweenIn2:Tween;
    var myTweenOut2:Tween;
    var nextLoadS2:String;
    // Listen for external event dispatched from external btns
    addEventListener("contactStage", btnClickExtrnl);
    function btnClickExtrnl(e:Event):void {
    nextLoadS2 = ?????
    myTweenOut2=new Tween(gallery,"alpha",None.easeOut,gallery.alpha,0,0.2,true);
    myTweenOut2.addEventListener(TweenEvent.MOTION_FINISH,tweenOutCompleteF2);
    // Btns Universal function
    function tweenOutCompleteF2(e:TweenEvent){
    myTweenOut2.removeEventListener(TweenEvent.MOTION_FINISH,tweenOutCompleteF2);
    myTweenOut2=null;
        var newSWFRequest:URLRequest = new URLRequest("swfs/" + nextLoadS2 + ".swf");
    myTweenIn2 = new Tween(gallery, "alpha", None.easeOut, gallery.alpha, 1, 0.2, true);
        gallery.load(newSWFRequest);
        gallery.x = Xpos;
        gallery.y = Ypos;
    Thank you.

    That works – thank you!
    I'm now using this code to fade in each of the SWFs:
    function contactStage(e:MouseEvent):void {
        var newSWFRequest:URLRequest = new URLRequest("swfs/"+e.currentTarget.name+".swf");
        myTweenIn = new Tween(gallery,  "alpha", None.easeOut, 0, 1, 0.2, true);
        gallery.load(newSWFRequest);
        gallery.x = Xpos;
        gallery.y = Ypos;
    But I cannot add the fade out function. I have amended the above code to create:
    var myTweenOutX:Tween;
    var myTweenInX:Tween;
    function contactStage(e:MouseEvent):void {
    myTweenOutX=new Tween(gallery,"alpha",None.easeOut,gallery.alpha,0,0.2,true);
    myTweenOutX.addEventListener(TweenEvent.MOTION_FINISH,tweenOutCompleteFX);
    function tweenOutCompleteFX(e:TweenEvent){
    myTweenOutX.removeEventListener(TweenEvent.MOTION_FINISH,tweenOutCompleteFX);
    myTweenOutX=null;
        var newSWFRequest:URLRequest = new URLRequest("swfs/"+e.currentTarget.name+".swf");
    myTweenInX = new Tween(gallery,  "alpha", None.easeOut, 0, 1, 0.2, true);
        gallery.load(newSWFRequest);
        gallery.x = Xpos;
        gallery.y = Ypos;
    But get this error:
    ReferenceError: Error #1069: Property name not found on fl.transitions.Tween and there is no default value.
    at ACOUSTIC_fla::MainTimeline/tweenOutCompleteFX()[ACOUSTIC_fla.MainTimeline::frame1:110]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at fl.transitions::Tween/set time()
    at fl.transitions::Tween/nextFrame()
    at fl.transitions::Tween/onEnterFrame()
    Where am I going wrong?

  • How to schedule a background job using the Event concept..?

    Hi Folks,
    I have a requirement that, I need a schedule a background job.
    Once after the previous job successful only, new job should get triggered. How to go ahead with this..?
    For Eg, I am scheduling a job called ZTEST periodically for 1 minute. If the job is not get completing with in 1 minute, I dont want to start my new job. Only after the success of my old job, I want my new job to run.
    Waiting for ur replies.
    Regards,
    Savi.

    Hi,
    You can use events that have already been defined, or you can create new events for scheduling background jobs.
    If you wish to use new events, do the following to implement the event scheduling:
    Define and transport the event as a user event with transaction SM62.
    You must define only event IDs; event arguments are not defined in the R/3 System. Instead, you specify event arguments when you schedule a job to wait for an event and when you trigger the event.
    If you define a new event, you must also transport it to your production systems. The event transaction does not have a connection to the transport system. Instead, you must create a transport request for the event yourself.
    Do this to transport an event:
    Create a transport request.
    Start the editor in the transport request and enter the following:
    R3TR TABU <table name> where table name is BTCSEV for a system event ID, BTCUEV for a user event ID.
    Press F2 with the cursor on the table name to call up the screen for specifying the table entries to transport. In this screen, enter the event ID’s that you have created.
    Save and release the transport request. Ensure that it is imported into your production system(s).
    To trigger an event, add:
    – the function module BP_EVENT_RAISE to your ABAP program, or
    – the program SAPEVT to your external script, batch file, or program.
    When your programs execute these keywords, an event will be triggered in the R/3 background processing system. The event-based scheduler is started immediately. It in turn starts all jobs that were waiting upon the event, subject to normal background processing restrictions, such as the requirement that the job has been released to start.
    Schedule the jobs that are to run when your events are triggered.
    You can schedule jobs for one-time start or to be started whenever an event is triggered.
    Regards,
    Raj.

  • How to use multiple events on one project?

    I want to make a show reel, this obviously involves using various events.
    I'm worried if I do this the whole file system will be a mess. Surely I should be sopying any files I want to use into the new showreel folder?
    How can i do this?
    Or is using various events ok?
    Hope someone ca recomend the best way forward

    You can edit from any event into the project. There is no need to copy the clips into a new event. When you're done you can archive the used clips into a new event.

  • How to use a event structure with a state machine

    First, I would like to inform you that I only work on LabView part time, and have much to learn.  Anything I do learn, I usually forget until I need it again, because I only work on it part time.
    Using your StopWhileLoopMOD[1].vi, I am trying to put a state machine inside the event structure.  
    Related link: http://forums.ni.com/t5/LabVIEW/How-to-stop-while-loop-in-Event-case/td-p/465564/page/2
    Here is my application:  on the front panel, the user can select any combination of 7 different tests.  I have created cases to perform each step of each test in the correct order, but if the user presses stop, the tests won't stop because some of the cases have a while loop inside the event structure (like you mentioned is a bad idea).  The user should be able to stop the test, reselect tests to perform, and re-start the tests. 
    When the start button is pressed for the event structure, I need all the cases to run in the proper order, unless stop is pressed.
    In the past I have indexed an array and used that to run the state machine, but it won't stop immediately.  
    I have sub VIs that are built in while loops because the outputs of the product needs time to stabilize.  The state machine stops and waits up to a certain number of iterations.  If it passes the test, the while loop stops and the next state starts.  If it takes too long, it exits and reports an error.  Maybe I need to just use the state machine and not an event structure?
    Is there a good example of an event structure?
    metzler CLAD
    Solved!
    Go to Solution.

    I'm not sure exactly what you are asking, but it sounds like you want to script a bunch of tests and if the user says stop, to immediately stop the current test and abandon the others?  I'm going to assume that you know how to clear the array so that it will abandon the others, so I'm guessing that you are having trouble abandoning the current test?  If this is indeed the case, then the problem is that you are not able to propagate the message from the main VI FP which is the GUI to the sub vi which is the test, where the test may or may not have a GUI (FP visible) of it's own.  Threading was the first thing to come to mind, but this may not be necessary using events.
    You can do this by passing a refnum of the stop button to the subVI, where you can then add that wait to the event case structure.
    I've attached 2 VIs, mainvi.vi which is just a loop displays the count*2 (number of seconds passed since running) that will call subvi.vi and then check to see if the stop button is pressed.  mainvi.vi is by no means a state engine, it is just a simple loop for demonstration purposes.  subvi.vi just waits 2 seconds and leaves, it is a better structured state engine with an init state to start a poll case to wait for events and an exit state to clean up.  You can modify this any way you wish to get it to do what you want.  You will note that even if subvi.vi is being executed, it will terminate immediately when the stop button is pressed.
    Hope this helps.
    A
    Attachments:
    mainvi.vi ‏17 KB
    subvi.vi ‏33 KB

  • I have copied videos onto an external hard drive. to free memory on my macbook. When I try to delete these I am warned that I will not be able to use this video in existing projects   How do I point iMovie to events in my external  hard drive so I can pl

    I have copied videos onto an external hard drive. to free memory on my macbook. When I try to delete these I am woarned that I will not be able to use this video in existing projects
    How do I point iMovie to events in my external  hard drive so I can play projects which use them?
    MacBook, iMovie 9.0.4

    Hi
    You can do this - by not doing it the way You describe as it will not work.
    a. the external hard disk - MUST BE - Mac OS extended (hfs) formatted -
    UNIX/DOS/FAT32/Mac OS Exchange - will work for most things - BUT NOT FOR VIDEO (iMovie, iDVD or FinalCut doesn't matter)
    b. Do not alter or move any folder named
    • iMovie Event's - or -
    • iMovie Project's
    on DeskTop/Finder - at all
    All moving's of Events and Projects must be done within the iMovie Application - then connections will not break.
    (move them back and see if iMovie remembers them - then do move as described above)
    Yours Bengt W

  • HOW TO CREATE  and  USE EVENTS IN WORKFLOWS .

    HOW TO CREATE  and  USE EVENTS IN WORKFLOWS with the help of classes.
    What i am doing is..
    open se24
    event tab->event name->parameters
    method tab->method name->event handler->copy parameters
    interface tab->if_workflow->enter
    tell me what else to do step by step
    Another important thing is that HOW to use these class events to trigger the workflows.
    REPLY ASAP
    THXS IN ADVANCE

    Hi,
    Pl. see this blog...
    Raising ABAP OO events for workflow
    Regards,
    JOy.

  • How to pass radiobuttons using a submit statements.

    Hi All,
    Can anyone tell me how to pass radiobuttons using Submit statement.
    My problem is that I am able to pass one select option and one parameter using the statement:
    submit (v_repid) to sap-spool without spool dynpro
                       spool parameters s_print_parms
                       using selection-screen '1000' WITH SELECTION-TABLE t_rspar_tab
                       and return.
    This selection screens got to check selections based on 2 radio buttons available in the selection screen which also i need to pass through SUBMIT.Please let me know how do i pass this to the Submit statement.
    Thankx in advance...
    Helpful answers will be rewarded fully...

    Hi Susanth,
                   Create Variant for the calling program, Give that variant( here in the below program variant for calling program that I created is VAR1) in the calling program in SUBMIT Statement.
    <b>
    CALLING PROGRAM:
    </b>
    data:
      w_variant(5) TYPE c VALUE 'VAR1'.
    SUBMIT YH625_CALLED_PROGRAM USING SELECTION-SET w_variant.
    <b>CALLING PROGRAM:</b>
    TABLES spfli.
    parameters:
          w_radio1 RADIOBUTTON GROUP g1,
          w_radio2 RADIOBUTTON GROUP g1.
    SELECT-OPTIONS s_table FOR spfli-carrid.
    WRITE '*************** This is Called program output **********************'.
    Hope this solves your problem.
    If you any query you are welcome.
    Regards,
    V.Raghavender.

  • How to use the eventing and databag with a WAS 6.20 ?

    How to use the eventing and databag with a WAS 6.20 ?
    Is what there is a good guide for these services?
    Thank's

    In the raise event you can pass the value
    like below.
    <SCRIPT>
    function raiseEvt(value1){
    if(window.document.domain == window.location.hostname){
    if ( document.domain.indexOf(".") > 0 ) document.domain = document.domain.substr(document.domain.indexOf(".")+1);
       EPCMPROXY.raiseEvent( "urn:com.sap:BWEvents","BWiViewevent", value1, null );
      // alert('tree domain'+document.domain);
    </SCRIPT>
    and in the
    subscribe event you can get the values like below.
    <script language="javascript">
    if(window.document.domain == window.location.hostname){
    document.domain = document.domain.substring(document.domain.indexOf('.')+1);
        EPCMPROXY.subscribeEvent("urn:com.sap:BWEvents","BWiViewevent", window, "myreceiveEvent");
    function myreceiveEvent( eventObj ) {
          document.forms[0].gp_hidden.value = eventObj.dataObject;
    </script>
    Also look at the following link for a complete documentation.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/Enterprise%20Portal%20Client.pdf
    Regards
    Raja

  • How to display the Logo by using TOP_OF_Page Event in OOPS

    Hi Gurus,
    I'm using TOP_OF_Page event to print Header and Logo in the same conatiner.
    Let me explain the case clearly,i have splitted the main conatiner in two parts like conatiner1 and conatainer2.
    i want to display logo and header in the container1, and i'm trying to use the * vertical_split * method ,but i'm unable to display the logo by splitting this conatiner vertically.........
    and if possible plz forward the sample code....
    Hence plz suggest me how to handle this.
    Thanks inadvance.

    Hi,
    In your top container i.e, container1, you can directly display the logo as well as text as there are methods already available in class  CL_DD_DOCUMENT(For eg, ADD_TEXT, ADD_PICTURE, ADD_ICON etc).
    Data:  lo_document TYPE REF TO cl_dd_document.
    CREATE OBJECT lo_document
        EXPORTING
          style = 'ALV_GRID'.
    CALL METHOD lo_document->add_text                   " To add text
        EXPORTING
          text         = text-006
          sap_fontsize = '18'
          sap_emphasis = cl_dd_area=>strong.               " For bold
      CALL METHOD lo_document->new_line.               " For new line
    CALL METHOD lo_document->add_text
        EXPORTING
          text         = text-018
          sap_emphasis = cl_dd_area=>strong.
      CALL METHOD lo_document->add_gap                 " To add gap in the same line
        EXPORTING
          width = 10.
    CALL METHOD lo_document->add_picture             " For picture
        EXPORTING
          picture_id       = 'TRVPICTURE01'
          width            =  '100'.
    CALL METHOD lo_document->display_document
        EXPORTING
          parent = lo_top_container1.
    Thanks and Regards,
    Himanshu

Maybe you are looking for

  • Strokes on appearance is getting cut off when exporting for web & Devices

    I'm a screen print artist using Adobe Illustrator CS5 in windows 7(blah!) to export images of our customers' artwork into a huge folder of images on a server. The images are then loaded into a program so that they can be viewed company-wide and by th

  • SWF not working properly after upload

    I have a Flash gallery that works locally but not after upload.  I added several photos to the xml file and only the original 8 jpgs are displayed. http://federalhomecompany.com/bricktest/fireplaces.swf Here is the html file... http://federalhomecomp

  • My iPhone is not switching on

    my iphone is not switching on, i just got a new iphone 5s yesterday, and it was working yesterday, i left it on charge overnight and i woke up today and it is not responding when i press the power button. help me what do i do?

  • Identification of eRecruiting External Candidate "userids"

    When an external candidate registers in eRecruiting, an SAP user is created. Does anyone know if there is a way to identify these users ? Ideally I would like to prefix the usercode with an underscore (or something) or be able to allocate a "user gro

  • It's not recognizing the serial number

    I try to enter the serial number off my prepaid adobe cloud card and it's not recognizing it as a valid number.