How to fire javascript Onchange function AUTOMATICALLY

Hi,
I have following 2 items both is having an Onchange javascript function.
P1_SELECT_LIST1 (javascript - Onchange1)
P1_SELECT_LIST2 (javascript - Onchange2)
I want to execute Onchange2 automatically whenever Onchange1 is executed.
I mean whenever Onchange1 is executed...I want Onchange2 javascript to fire automatocally..
Thanks,
Deepak

Deepak,
I didn't get what you are trying to here?
P1_SELECT_LIST1 - HTML Form Element Attributes
onchange="javascript:f1(this);"
function f1(pThis)
$x_Value('P1_YYYY','XX');
}So on change of SL1, f1 will fire and you are passing the object to f1. But you are not using it? So whats the use of passing it?
In your initial post..
I want to execute Onchange2 automatically whenever Onchange1 is >executed.But you are doing it in reverse?
However you may try..
P1_SELECT_LIST1 - HTML Form Element Attributes
onchange="javascript:f1();"P1_SELECT_LIST2 - HTML Form Element Attributes
onchange="javascript:f2(this);"Page - HTML Header
<script type="text/javascript">
function f2(pThis)
//pThis is an OBJECT not item name
   if (pThis.value == 'C')
// set P1_XXXX to null
     $x('P1_XXXX').value = '';
   else if (pThis.value == 'E')
// whats the use of doing this?
     var v1 = $v('P1_SELECT_LIST1');
     <!-- alert (v1);  -->
     f1();  // -- No need to pass parameters
function f1()
// set P1_YYYY with value XX
// XX is Constant?
  $x_Value('P1_YYYY','XX');
</script>Regards,
Hari

Similar Messages

  • How to fire af:table selectionListener automatically after data fetch ?

    I want to fire my selectionListener automatically after data is fetched.
    Attribute rowSelection of af:table component is switched to "single".
    I'm using databinding layer and bc.
    But i can't find an attribute to set autosubmit.
    How can i do this ???
    (in 10.1.3 version of jedeveloper i can set an af:tableSelectOne component to autosubmit = true,
    but ADF tableSelectOne component does no more exist in Jdev 11)

    user568840,
    The easiest way to accomplish this is to explicitly invoke the default listener programmatically by calling on the EL expression. Add something like this to a method that is bound to an invoke action in your pageDef should work nicely.
       public void invokeOnPageLoad(){
         resloveMethodExpression("ViewObj.collectionModel.makeCurrent", null, new Class  {SelectionEvent.class});
        public static Object resloveMethodExpression(String expression,
                                                     Class returnType,
                                                     Class[] argTypes,
                                                     Object[] argValues) {
            FacesContext facesContext = getFacesContext();
            Application app = facesContext.getApplication();
            ExpressionFactory elFactory = app.getExpressionFactory();
            ELContext elContext = facesContext.getELContext();
            MethodExpression methodExpression =
                elFactory.createMethodExpression(elContext, expression, returnType,
                                                 argTypes);
            return methodExpression.invoke(elContext, argValues);
        } --RiC                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How do i call recieve function automatically on certain character believe on terminal

    i think i m using intalcomback function but function is not calling on recieving certain character. i simply want to get data continuously and disply the whole packet and then want to seperate ceratain data from that.

    Hi khadimhussain,
    There is very little useful information here.  Could you please provide a detailed description of your application (with context: I need to know why you are doing what you are doing not just what you are doing) and what you want to accomplish with the installComCallback function as well as either screenshots or an actual copy of your code? It will be very difficult to debug your code without being able to see how you are implementing it.  

  • How do i call recieve function automatically on when certain character receive on terminal

    i m using
    installComCallback
    function but function is not calling on recieving certain character. i simply want to get data continuously and disply the whole packet and then want to seperate ceratain data from that. i use the event character and i selected the character CR. i m sending 29 bytes packet from labwindows application and reciveing this packet and i used installcomcallback function and used evencharacter. but the function is not recieving
     

    Hi khadimhussain,
    There is very little useful information here.  Could you please provide a detailed description of your application (with context: I need to know why you are doing what you are doing not just what you are doing) and what you want to accomplish with the installComCallback function as well as either screenshots or an actual copy of your code? It will be very difficult to debug your code without being able to see how you are implementing it.  

  • How to use JavaScript to Open a link automatically

    Is there a method (using JavaScript) to allow a user clicked link to open the link through a “intermediary” page?
    For example, say I have a web page with a embedded Flash file that contains links to several different (outside) web pages. The behavior I want is that the user clicks a link (within the Flash file), a HTML window opens (over the 1st HTML/Flash window) with the new content, leaving the original Flash/HTML window displayed in the background. The user reads the new content. The user can then close the newer window and be back at the displayed HTML/Flash file.
    The twist is that the link embedded in the referring Flash/HTML file goes to a “intermediary page”. Call that the “collector” page. I control that page. On that page I have collected (in a list) all the actual outside URLs (I do this so that I can easily change the URLs using HTML rather than having to edit the Flash file.) The Flash file contains essentially the same URL for each outside location (plus a variable unique to a specific URL).
    The user should not ever actually see this intermediary/collector page. Instead, they click the link, a variable is passed from the referring page to the collector page and fires the corresponding link automatically (replacing the content in the newly created window). Since the link fires automatically the content in the new window (initially created by the collector page) changes to the destination content.
    Is this possible?
    What JavaScript functions are used?
    How are the referring links constructed in the Flash so the variable is passed to the collector page?
    How does the “collector” page auto open the actual content?
    If anyone can point me to descriptions on how this might be done I’d certainly appreciate it.
    TPK

    >is there a way i can call javascript without security checking?
    It wouldn't be security if you could just bypass it. Did you read all
    the security notes? You might be able to do something with trusted
    functions, but I'm not sure how that would integrate with a plug-in.
    Aandi Inston

  • How to call javascript function from PL/SQL procedure

    Can anybody advice me how to call javascript function from PL/SQL procedure in APEX?

    Hi,
    I have a requirement to call Javascript function inside a After Submit Process.
    clear requirement below:
    1. User selects set of check boxes [ say user want to save 10 files and ticks 10 checkboxes]
    2. user clicks on "save files" button
    3. Inside a After submit process, in a loop, i want to call a javascript function for each of the file user want to save with the filename as a parameter.
    Hope this clarify U.
    Krishna.

  • How to reference JavaScript functions stored in a script object on a different page?

    Hi,
    I have a form which has 2 pages. I have a bunch of JavaScript functions under script objects on page 1. How can I access these functions from page 2?
    I tried the following but none of it work:
    form1.page2.#variables[0].testScript.doThisNow();
    form1.page2.variables[0].testScript.doThisNow();
    form1.page2.variables.testScript.doThisNow();
    Please help.

    Hi,
    Simplest way would be to drag the script object to be under the root node (form1). On both pages would would then be able to reference the function by:
    testScript.doThisNow();
    If you leave the script object under page1, then from page2, the following should work:
    page1.testScript.doThisNow();
    Hope that helps,
    Niall

  • HT1841 How to disable some of the automatic function from my bluetooth (jabra) while iphone does not have the capacity to set up the bluetooth property like BB?

    How to disable some of the automatic function from my bluetooth (jabra) while iphone does not have the capacity to set up the bluetooth property like BB?

    Sorry. You're not making sense. Please re-phrase the question or post in your native language.

  • How can I decode Japanese character using java from JavaScript escape() function

    Hi:
    I have an application which supports Japanese character. I am using JavaScript escape() function to encode the text field before I posted it through web server and then I will just convert it into hex number to decode it through an Integer. It works fine for the character between ascii 1-255. However, it faild on all the double bytes character. All the unicode has the format of "%uXXXX" after it is escaped from JavaScript. How can I resolve the decoding problem?
    Thank,
    David

    Please use 'encodeURI()', though it is supported only IE after 5.5.
    I'm not sure Netscape.
    Thanks,
    Katsumi
    dwang <[email protected]> wrote:
    Hi:
    I have an application which supports Japanese character. I am using JavaScript
    escape() function to encode the text field before I posted it through
    web server and then I will just convert it into hex number to decode
    it through an Integer. It works fine for the character between ascii
    1-255. However, it faild on all the double bytes character. All the
    unicode has the format of "%uXXXX" after it is escaped from JavaScript.
    How can I resolve the decoding problem?
    Thank,
    David

  • How can I get this function to fire off last?

    In the following code, there are two buttons on the stage- "button1" and "button2". 
    I want to get the buttons to change frames and THEN have the "playerChange" function fire off.
    Currently, the "playerChange" function fires first. Moving the function  either renders the code inoperable or
    returns error messages.
    function buttonChange (e:MouseEvent)
    {if    
                    (e.target.currentFrame == "frame1" )
             if (e.target==button1) (playerChange)
                     (e.target.gotoAndStop(player.currentFrame + 1)) 
               else{player.gotoAndStop(player.currentFrame)
              if (e.target==button2)  (playerChange) 
                    (e.target.gotoAndStop(player.currentFrame + 1))
              else{player2.gotoAndStop(player2.currentFrame)
    button1.addEventListener(MouseEvent.CLICK,buttonChange );
    button2.addEventListener(MouseEvent.CLICK,buttonChange);
    Note:this is an abridged version of the code. The code I'm actually using uses 20 buttons and about 8 conditionals for each button, so e.target is more convenient than writing a command for each button.

A: How can I get this function to fire off last?

the code is very hard to understand
it's badly formatted
{}'s don't match
you aren't calling a playerChange function
this is my guess at something that might work for you
function buttonChange (e:MouseEvent)
          if(e.target.currentFrame == "frame1" )
                    if (e.target == button1)
                              e.target.gotoAndStop(player.currentFrame + 1);
                              playerChange();
                    else
                              player.gotoAndStop(player.currentFrame);
                              if (e.target == button2)
                                        e.target.gotoAndStop(player.currentFrame + 1);
                                        playerChange();
                              else
                                        player2.gotoAndStop(player2.currentFrame)
button1.addEventListener(MouseEvent.CLICK,buttonChange );
button2.addEventListener(MouseEvent.CLICK, buttonChange);

the code is very hard to understand
it's badly formatted
{}'s don't match
you aren't calling a playerChange function
this is my guess at something that might work for you
function buttonChange (e:MouseEvent)
          if(e.target.currentFrame == "frame1" )
                    if (e.target == button1)
                              e.target.gotoAndStop(player.currentFrame + 1);
                              playerChange();
                    else
                              player.gotoAndStop(player.currentFrame);
                              if (e.target == button2)
                                        e.target.gotoAndStop(player.currentFrame + 1);
                                        playerChange();
                              else
                                        player2.gotoAndStop(player2.currentFrame)
button1.addEventListener(MouseEvent.CLICK,buttonChange );
button2.addEventListener(MouseEvent.CLICK, buttonChange);

  • How to call javascript function with dynamic data in display tag

    Hi,
    Iam new to pagination concept. Iam using display tag to display rows in jsp by strtus.
    I have a problem when calling the javascript function using ahref in attribute in display tag.
    <bean:define name="form1" property="EditDetails.List" id="ListDisplay"/>
    <display:table name="pageScope.ListDisplay" cellpadding="0" cellspacing="1" pagesize="10" partialList="false" size="listSize" requestURI="">
    <display:column property="poNo" href='javascript:searchEditDetails("./submitOrder.do? actionID=getMISLoadEdit&poNumberSel=<%=((com.po.bean.EditDetails)poListDisplay).getNo()%>&statusIdSelected=<%=((com.po.bean.EditDetails)ListDisplay).getStatusId()%>")'
    title="Number"/>                         
    <display:column property="strDate"title="Date" />
    <display:column property="orderValue"title="Order Value(INR)"/>
    <display:column property="stringRequestedDeliveryDate"title="Suggested Delivery Date"/>
    <display:column property="statusDescription" title="Status" />
    </display:table>
    The above code display the data in row format is working fine when I click the No It thow javascript error and its not redirecting to the other page.
    When I try this with ordinary struts its working fine the code is:
    <logic:iterate id="polist" name="Form1" property="EditDetails.List" indexId="i" type="com.bean.EditDetails">
    <tr>
    <td ><a href="javascript:searchEditDetails("./submitOrder.do?actionID=getMISLoadEdit&NumberSel=<%=((com.bean.EditDetails)polist).getNo()%>&statusIdSelected=<%=((com.bean.EditDetails)polist).getStatusId()%>")"><html:hidden name="polist" property="No" write="true" /></a>     </td>
    <td><html:hidden name="polist" property="strDate" write="true" /></td>
    <td><html:hidden name="polist" property="orderValue" write="true" /></td>
    <td><html:hidden name="polist" property="stringRequestedDeliveryDate" write="true" />     </td>
    <td><html:hidden name="polist" property="statusDescription" write="true" /></td>
    </tr>
    </logic:iterate>
    Please help me how to call javascript with dynamic data.
    Thanks in advance

    The ADF Mobile Container Utilities API may be used from JavaScript or Java.
    Application Container APIs - 11g Release 2 (11.1.2.4.0)

  • How to call javascript function?

    Hi,
    How to call javascript function for SAP button
    control onclick event?
    Thanks in advance.

    Hi Sundar,
      u can call java script  in design mode.
      Add this code in ur design part inside body and call the function as
    <sap:button id="a" onSelect="javascript:go();"
    Add inside body:
      <script language="javascript>
    function go(){
    alert("hai");
      </script>
    Regards,
    Vinoth.M

  • How to invoke  javascript function after business action??

    How to call javascript function(such as "window.close(), window.open(...),...") in the action method(public String doBusiness(){...}) of <h:commandButton>?If not,then,is there any alternate approach to call javascript function when the bussiness action method finished??
    Thanks a lot!

    Since your business method is called after the form is submitted, and your code is running on the server, probably the only thing you can do is this:
    Create a custom component (Maybe call it the "onLoad" component) that you always render at the top of your JSP. In the regular situation it wouldn't render anything, but in the case you mention, after your busines method, you would call a method on this new component on the server that would cause it to actually render something the next time it is rendered. When rendered this time, it could then render the "onLoad" method which has your window.close() code in it. The window would then close right away.
    The key is that you are not doing any of this on the client. The form is submitted, your business logic is executed, then the next page is rendered. When the next page is rendered, your javascript could be rendered to close the window.
    If I'm offbase here, someone please say something, I'd hate to send this guy on a wild goose chase.
    Dave

  • Hyperlink - How to execute it action function(Java) and then JavaScript

    Hi all, I have a hyperlink in a popup window. When the hyperlink is clicked I want it's action function to be executed. This works fine, the problem is when I put java code in the hyperlink's javascript onClick() function, only the onClick() gets called and not the action function.
    I need the onClick to close the window and submit the main form and I need the action function to set some session variable.
    Thanks in advance for any replies.

    Hi, thanks to anyone that read my post. I found a solution. I removed the code from the hyperlink's javascript onClick and placed it the body onload javascript function. I also set a flag to true when the hyperlink is clicked and only execute the code in the body onLoad() when the flag is true.

  • How to run planing function automatically by using planing folder (UPSPL)

    Hi All,
    We have 2 planing packges one for local currency and one for global currency  in the planing folder .We have exit function to upload the file from work ststion  for both local and global currency packages .
    Now we have Requiremnt to distribute or calaculat the remaning keyfigure values based on planned keyfigure in the planing package .We created one more exit function to allocate or calculate the amounts for remaning keyfgire.
    Everything works fine.But issue is how to execute the planing function 2 after saving the data in planing folder ?. is there any possiblity.Attribtues options of Execute when saving was disbaled .So i have option to choose execute function before layout change .But when i choose this option data is getting ovewrtied with old values. because last daya in the planing  was executing before layout change or before selecting file.
    Can anyone let me know how to solve this,
    Thanks in advance,

    Yes that right.but when i place these functions  in the layout section and give attribute as run before layout change.
    While writing the data to cube its also picking up the previous plan values from the layout with new values.
    I have another function also which will upload the file from desktop to layout .While i choose this file planing function running autoamtiaclly in the background becuase of settng we made (run before layout change).I
    I think this time planing function  executing 2 times .One is when i choose the file into the layout and at the time of save the data.
    This way old plan and new plan data getting into the cube and getting enermous results.
    How can i achieve this.If i create global planing sequence how can i exeute that while user save the data from planing folder ?.Can you explain the possble senaios step by step.

  • Maybe you are looking for

    • MY MOBILE IS IPHONE 5C BUT WHEN I LOGIN TO MU ID IT SHOWING INCORRECT PASSWORD

      HI I HAVE APPLE IPHONE 5C BUT WHEN I LOGIN TO MY ID IT'S SHOWING LIKE INCORRECT PASSWORD AND WHILE I AM DOING RESTORE IPHONE  IT DISCONNECTING IN MIDDLE OF THE PROCESS THEN HOW CAN I ACTIVATION MY PHONE

    • Bonjour service running but itunes doesn't recognize it

      Hi, I have a Windows 7 computer. I had previously disabled the bonjour service due to conflicts. But now I need it to share with an apple tv. I reinstalled bonjour and my system shows it as running. However, itunes (which i also deinstalled and reins

    • UNIX Script Not running - Sender File Comm Channel

      I have written a script to split a large file into smaller files . It works great when I log into the server via putty, and run it from the command prompt . However, when I  run it from the Sender File Channel "Run OS command before/after processing"

    • URL iView in Web Page Composer

      Hi, I have created a URL iView in the PCD and I wanted to embed this iView in the container of the Web Page Composer page. I have created an entry point to the PCD folder that contains the URL iView.  The PCD URL to the iView is http://abc.abc.net:50

    • Installing lightroom 5 onto iMac won't work.

      I am trying to install lightroom 5 onto my iMac and i keep getting a message that says "you cannon open the application setup64.exe because microsoft windows application are not supported OS X. please help, what am i to do? Is there something else I