Script for retraction button

HI ,
    I need to do retraction using a button in Wad - it should call a class , this executes and data is pushed through an XI system and flushes the data in ECC box. if you could give the jave script code it would be really helpful.
thanks
Edited by: Kasi Viswanath Aurangabad on Apr 15, 2011 1:14 PM
Edited by: Kasi Viswanath Aurangabad on Apr 15, 2011 1:14 PM

You are re-declaring count with every on(press), so your
count=count+1 is discarded every time. I don't see why it even
works with first press though - are you sure you don't have more
than one count defined?

Similar Messages

  • How do you use two scripts for a button?

    Hi all!
    I'm referring to my earlier question posted in this topic:
    Object not found with myContext.getParamIdForComponent
    In short: when I had the attribute 'jsObjectNeeded="true"'  on a button and that was for a script that would start a function validating a field, and then at the same time had a script in the button that would activate the "pressing" of it through the hit of the "return" button, I got javascript error saying "Error: Objekt doesn't support this property or method"
    Do you know a way to have both functionalitys connected to the button?
    Best regards
    Benny

    HI Benny Lange,
    <hbj: button
    id="Button1"
    text="Logon"
    width="125px"
    onClientClick="javascript func for validation"
    //first onClientClick will be executed
    onClick="call the method in JSPDYNPAGE"
    //second onclick will be executed
    disabled="false"
    design="STANDARD" />
    jsobjectneeded has nothing to do with onclick.this should work.post your code if you need help.
    Message was edited by: Kirupanand venkatapathi

  • How to use the same script for multiple buttons

    Hi,
    I've only just started using flash so any help would be great!
    I'm creating a blockbusters type game, I have a grid of 20 buttons and I need  them (individually) to turn blue on click and red on double click. I've managed to do it with the first one using this code;
    var clicked:Boolean = false;
    bn1.addEventListener(MouseEvent.CLICK, bn1click);
    function bn1click(event:MouseEvent):void {
        clicked = true;
        var newColorTransform:ColorTransform = bn1.transform.colorTransform;
        if(clicked){
        newColorTransform.color = 0x064258;
        bn1.transform.colorTransform = newColorTransform;
    bn1.doubleClickEnabled = true;
    var doubleclicked:Boolean = false;
    bn1.addEventListener(MouseEvent.DOUBLE_CLICK, bn1dclick);
    function bn1dclick(event:MouseEvent):void {
        doubleclicked = true;
        var newColorTransform:ColorTransform = bn1.transform.colorTransform;
        if(clicked){
        newColorTransform.color = 0xac1e23;
        bn1.transform.colorTransform = newColorTransform;
    Now I'm having trouble getting the same to work for the rest of the buttons, they are each named bn2, bn3 etc. They need to work individually and remain blue/red once clicked. I've tried listing them as addEventListener commands but not having a great deal of success!
    Any help would be greatly appreciated, thanks!
    Tomo

    One way to do this is to use arrays to keep track of the buttons and their properties.
    var buttonList:Array = new Array(bn1,bn2,bn3);
    var clickedList:Array = new Array();
    var doubleClickedList:Array = new Array();
    //then use a for loop to assign the functions and properties for each button:
    var thisMany:int = buttonList.length; // this will give you the number of items in the buttonList array
    for(var i:int = 0; i<thisMany; i++) {
         buttonList[i].addEventListener(MouseEvent.CLICK,btnClick); // assign the click function to each button
         buttonList[i].addEventListener(MouseEvent.DOUBLE_CLICK,btnDClick); // assign the double click function
         clickedList.push(false);  // add a false value for each button to this array
         doubleClickedList.push(false);
               buttonList[i].doubleClickEnabled = true; // set the double click property for each button
    function btnClick(event:MouseEvent):void {
              var thisButton:int = buttonList.indexOf(event.target);  // figure out which button was clicked as an item in the array
              clickedList[thisButton] = true;  // change the value in the array
               var newColorTransform:ColorTransform = buttonList[thisButton].transform.colorTransform;
        if(clickedList[thisButton]){
        newColorTransform.color = 0x064258;
        buttonList[thisButton].transform.colorTransform = newColorTransform;
    function btnDClick(event:MouseEvent):void {
              var thisButton:int = buttonList.indexOf(event.target);
              doubleClickedList[thisButton] = true;
        var newColorTransform:ColorTransform = buttonList[thisButton].transform.colorTransform;
        if(doubleClickedList[thisButton]){
        newColorTransform.color = 0xac1e23;
        buttonList[thisButton].transform.colorTransform = newColorTransform;
    Now you can have any number of buttons, just add their instance names to the array at the top.

  • LifeCycle 8 Database update script for submit button

    I have a form that has numerous text fields for user inputs. I put a button on the form. This form is also populated with a SQL query when opened.
    When the user clicks the submit button, I need to capture the info entered in these fields, get one of the field value from the query when opened, and update a database record.
    How is that script done? Any sample scripts?
    Thanks in advance.

    I have a form that has numerous text fields for user inputs. I put a button on the form. This form is also populated with a SQL query when opened.
    When the user clicks the submit button, I need to capture the info entered in these fields, get one of the field value from the query when opened, and update a database record.
    How is that script done? Any sample scripts?
    Thanks in advance.

  • Create script for a button to open a PDF using AS3

    I created a Flash movie in AS3 on the mac. I have several
    navigation buttons, I want to be able to click on a button and open
    a PDF. The finished movie will be an executable for the pc. I also
    want to do the same for a .swf file.

    Well, I think I got it working. The code I came up with seems a lot more simple than what I was experimenting with. I am pretty sure I did something earlier that was similar to this code but the current swf stayed with the player when the new one loaded, I am pretty sure the old swf is hiding underneath the new one but after some testing, the actual presentation is working as intended so I am waving the AS3 white flag and am accepting how this functions in its present state. I nearly gave myself a heart attack trying to get this simple function to work
    Anyway, heres my "final" code. If anyone sees something that should be adjusted, please let me know.
    play_iv.addEventListener(MouseEvent.CLICK, loadmain);
    function loadmain(event:MouseEvent):void {
                var prevu_english:Loader = new Loader();
                prevu_english.load(new URLRequest("assets/PreVu - English.swf"));
                addChild(prevu_english);
    Also, Thankyou Ned. You pointed me in the right direction. If I didn't keep looking at the loader class, I probably would have spent days doing trial and error until I got somewhere.

  • SAVE AS BUTTON WITH JAVA SCRIPT FOR MOUSE UP EVENT

    Please any one help with complete code for "SAVE AS" button to auto save the acrobat form in a user specified path
    with unique name or incremental name.Please post only full script for MOUSE UP event.

    Thanks George but i need an example.my actual need is
    i have created a SAVE INVOICE button.i have set the action"Mouse up" to run a Java script.
    Now i need a scriprt for the same.
    If i press that SAVE INVOICE button.the fie should save on "C:\Users\MUNNA\Desktop" automatically
    with unique name and the name should not remain same for next Save.because it overwrites the previous
    file so please post an example pdf with same.

  • Scripting for when all buttons are clicked

    Im quite new to flash well at least the scripting part of it.
    I'm much more of a designer and I'm having big problems I know that
    it is prob very simple but I am totally useless at it! Can some1
    please just point me in the right direction thank you xxx

    If you're testing in flash you should see some trace outputs
    in the output panel. If you don't then there's something not
    working right.
    When you press each of your buttons, you want the main
    timeline to go to a different frame right? You need to set those
    frame targets in the code.
    example for but_bat:
    {button:but_bat, gotoFrame:2},
    this sets things up so that when but_bat is pressed, the
    timeline goes to frame 2.
    You will need to set the others for their correct frame
    targets. Just change the numbers for gotoFrame:
    number here
    Is what you want to happen when
    all of the buttons have been clicked that a congratulations
    sign movieclip is played? (You haven't said what you wanted it to
    do at that point, so I'm afraid I couldn't know that ;-) ) At the
    moment I've set the script up so that it checks... but all it does
    is trace an output:'I would normally want to do something special
    from this point' where whatever you want to have happen when
    they're all pressed would be requested by actionscript. If you tell
    me what that is, I can tell you the code to do it.

  • [svn:fx-trunk] 5579: Be consistent with the scripts for Button sample

    Revision: 5579
    Author: [email protected]
    Date: 2009-03-26 11:06:44 -0700 (Thu, 26 Mar 2009)
    Log Message:
    Be consistent with the scripts for Button sample
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/FxButtonExamp le.mxml

  • Button Scripts for Sharing on Social Media

    I need sharing scripts for social media buttons (Google+, LinkedIn, Twitter, FaceBook). For example, hovering over a button produces a tool tip ‘Share this site on Google+’ and clicking the button pops up a login window, or similar.
    Anyone has good and simple scripts?

    I found button scripts right here in the Adobe Developer Connection Cookbooks http://cookbooks.adobe.com/post_Simple_social_networking_share_buttons-19482.html
    However, there is a bug: Google Chrome displays a LinkedIn pop up with an editable field. I tried to report the bug in a comment to the article, but I got a 'server communication error' message.
    Anyone knows how to report the bug, or fix the bug?

  • Script for billing document

    hi all ,
    is there any standard sap script and its print program for billing document (sd).
    and how to find the standard scripts for a particular requirement.
    regards
    reena

    hi,
    Script is RVINVOICE01
    Driver program is : RVADIN01.
    goto trns NACE select the application and click on the output types button and
    click on the output type and select processing routines...
    regards,
    priya.

  • Problem in embedding a png file for a button's skin

    I am trying to embed a png graphic as a skin for a button using actionscript class for a custom component. It has an error: "unable to resolve 'btn.png' for transcoding" - see method 1 code below. However, it works fine in method 2. Code are all shown belown. Can someone help regarding why this happens and how to make method 1 work?
    Got error in method 1:
    package net.abc.free
        import mx.core.BitmapAsset;
        public class myComp extends Canvas {
            [Embed(source="assets/btn.png")]
            [Bindable]
            public var clasBtn:Class;
        public function myComp() {
            super();  
    Successful in method 2: 
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
        <mx:Script>
            <![CDATA[
                import mx.core.BitmapAsset;
                [Embed(source="assets/btn.png")]
                [Bindable]
            public var clasBtn:Class;
            ]]>
        </mx:Script>
        <mx:Panel id="mainPanel" width="400" height="300" backgroundAlpha="0">
            <mx:HBox width="100%" height="100%" horizontalAlign="center" horizontalGap="100">
                <mx:Button id="myBtn" upSkin="{clasBtn}"/>           
            </mx:HBox>
        </mx:Panel>
    </mx:Application>

    If you don't put "/" in front of the path Flex will look for the file in the relative path of the file you refer it from.
    Your first example will look for the png file in:
    /net/abc/free/assets/  -- wrong path
    Your second example will look for it in:
    /assets/ -- since the application mxml file is at root level
    but if you put /assets/  it will look for it in /assets/ no matter where the MXML/AS file is

  • ALUI Gateway Not Returning Scripts for Subset of Users

    We have a problem where the ALUI gateway is not returning some .NET scripts for a subset of users. We have the ALUI 6.5 portal and our using the .NET accelerator 3.1.
    The situation is that this subset of users request one of our portal pages via https, which then reaches through our firewall to our remote server which is running the .NET portlet. The .NET page is served and returned to the users correctly and quickly, but this particular subset of users do not see the result rendered in their browsers for about 3 minutes. A view html source in the browser, as well as tools like Fiddler, show the page is indeed in the browser, but it is stuck trying to request some .NET scripts, and only displays the page when those requests timeout.
    The .NET scripts that are problems are both WebResource.axd and ScriptResource.axd, which in some cases are in our .NET portlets because of the .NET framework itself, but in other cases they are there only because of the ALUI portal itself, when it munges the .NET portlet to handle multiple server forms and validators and such. These .axd scripts are gatewayed so that the client browser requests them through the ALUI gateway, which in turn requests them through our firewall to our remote server -- which always serves these scripts correctly and quickly according to the IIS logs. The problem seems to lie in the ALUI gateway, as it is receiving these scripts correctly and quickly, but it is not returning them to this subset of users. Instead the ALUI gateway seems to be processing for about 3 minutes, and eventually returns an html error page, which of course the client never sees since it is expecting javascript, but we can capture the error page via Fiddler and its just telling us there was a timeout -- the client browser just notes that there is a javascript error.
    The really bizarre part is that this only happens for a subset of users, which amounts to about 20% of our users. There are 2 things that delineate these users that we have found so far. First, these users have email addresses that are 27 - 30 characters long, and the email address is our login id. Note that both shorter and longer email addresses are OK, so there is not some limit to email addresses like this might sound like at first. Secondly, these users have to be in a particular branch of our ldap store, which means they are replicated across to the portal in a particular group. We can move these "bad" users into another branch of our ldap store and once they are replicated to the portal then they work fine, and then if we move them back they return to not working. We cannot find any other difference in our ldap branches or in the corresponding ALUI groups, plus its only the ones in that particular branch with the email lengths in that very specific range.
    The gatewayed requests for these scripts vary by user since the PTARGS in the gatewayed request include the integer userid, but that does not seem to matter because we can have a "good" user successfully request the script with a "bad" user's id, and we can have a "bad" user fail to successfully request the script with a "good" user's id. That seems to point to maybe the authentication cookie being the differentiating factor that determines whether or not a gatewayed request for one of these script files will succeed or fail. So far we have only seen the problem with these particular .net axd scripts, but that may simply be because we don't have many, if any, other scripts or resources that need to be gatewayed since we usually put resources on our imageserver -- these being different because .NET and/or the ALUI portal puts these references in there for us whether we like it or not. Long-term we can re-architect our .NET portlets to not get have these axd scripts, although as mentioned earlier, we also see the ALUI portal put these axd scripts in our portlets as part of their munging process -- so that is not in our control completely. We do need to test if this subset of users can successfully request other gatewayed resources or not -- this is actually the first time I thought of that test case, so all I can say right now is its axd scripts that we know are problems, but it may or may not be a bigger problem.
    One last comment, as we appear to have found a work-around, but it does not make sense at all, and its not our preferred solution, so we still very much believe there is a problem elsewhere -- most likely in the ALUI gateway, but possibly somehow related to authentication that we do not understand. Our work-around that so far seems to work is to make our remote server be accessed via https instead of http -- which matches the way the client browsers call our portal (https). Again that first doesn't make sense, since this is only a problem for a small subset of users -- obviously calling our remote server via http works successfully for all other users, so its not just is a simple case that we must match protocols or it won't work. We also use http successfully for our calls to the remote server for portlets that are Java, although its possible that they don't have any gatewayed resources. But we also would just prefer to not use https for our internal calls in our own network as there is no need for the extra overhead -- and by the way our dev and qa environments do use http even for these .NET portlets and do not have the same problem. What's different in our production environment? The only things that should be different are that we have multiple portal servers and multiple remote servers that are load balanced (not sure that's the right term for how the remote servers are combined) -- and of course we have a firewall between them that does not exist in dev or qa.
    So we would very much appreciate any thoughts on this, whether you've seen something like it before, or just have some additional insight into the gateway and/or authentication process that seems to be the issue.
    Thanks, Paul Wilson

    We've ran into this problem when using the Microsoft ReportViewer control. In our case, we found that the portal gateway malformed the urls containing webresource.axd, so the browser was unable to get the correct address to the files. Note that there are usually multiple links to the axd files, they return different resources depending on the query string they get.
    To solve the problem, we ended up with a bit of a hack solution, but it works well. We extracted the resources we needed from the ReportViewer control's assembly using Reflector, and then published them on the image server. The next piece was to override the Render method of the page that hosted the control. In our custom version of Render, we parsed the html of the page, and replaced the contents of the src= elements with pt:images// links. These processed just fine in the portal's transformer, and our resources started showing up.
    Our Render looks something like the following code sample. The "HACKReportViewerControlPortalImageGatewayFix" class has all of the code to do the parsing. In this case, it is specific to the report viewer, because it has some special considerations for parsing the urls. My bet if that your code will be quite custom as well. Therefore, I've not included this piece of code. The important piece below is the invocation of MyBase.Render, which tells the page to render all of it's contents. Once that method is done, all of the HTML for the page is in the writer. The ModifyImageTags method then parses the html, doing the necessary replacements. Finally, the modified html is written to the page's writer, so it can be output following the normal .net processes. Also note that when parsing for urls to replace, don't do all of them, just look for the ones containing axd.
    (VB.NET)
    Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter)
              Dim fixer As New HACKReportViewerControlPortalImageGatewayFix
              MyBase.Render(fixer.GetWriter)
              writer.Write(fixer.ModifyImageTags())
    End Sub
    This works great for images. However, if you are dealing with javascripts, I'm not sure if this will work for you - as some .NET controls send different scripts depending on the browser. For example, in IE, you get more buttons on the toolbar for the ReportViewer, so you get more javascript too. When using FF, you get less buttons, and less script. We didn't have a problem with the scripts, so we haven't needed to solve this one.
    As for timing, this type of solution doesn't take much to put together. You are really just doing some string parsing and replacements. If you are a regex ninja, it's probably even easier. We had our solution working in a day or two.
    An added benefit to this solution is that you are putting less bytes through the portal's gateway, and sending that traffic to the image server instead.

  • Apple script for Message box when Mail app Compose Window Opens

    Hi there
    I'm trying to make mail app remind me to choose the right emaill address to send from since I have several email addresses. Is there a way I can make or write an apple script for a message box to pop up whenever mail app's compose window opens up.
    I can do for the case when I actally click the compose button when I'm on mail app by using UI scripting. But when it comes to hyperlinks which opens up the compose window, it fails.
    I just want a script to see whether the compose window is open and if open pop up a message box.
    Thanks
    Best regards
    Zam Shabeer Thahir

    TaoChitpol wrote:
    By the way, the problem happens with the account of MS Exchange service, I don't know if this is the cause of the problem.
    I think yes.  The encoding is being corrupted somewhere, probably Exchange.  There is nothing you can change on the iPad other than the OS languagel, to see if that helps.  You can also tell Apple at
    http://www.apple.com/feedback/

  • Popup Script for Save, edit & Delete Records

    Hi Friends,
    I developed an application, has got buttons like Save, edit, delete particular records. Is there any Java script for the above, to show popup Screens, like the   confirm java script
    <SCRIPT LANGUAGE="javascript">
    <!--
    function CONFIRM(){if (!confirm
    ("Are you Sure to  Edit Record?Ok=Yes,Cancel=No "))
    history.go(-1);return " "}
    document.writeln(CONFIRM())
    <!-- END -->
    </SCRIPT>
    pls mail me any sample code & Relevant weblogs regarding this.
    Regards
    CSM Reddy

    Hi,
    The following code will work... i have tested it.
    <b>test.jsp</b>
    <%@ page language="java" %>
    <html>
         <head>
              <title>
                   TestForm
              </title>
         </head>
         <script type="text/javascript">
    function confirmSAVE() {
    var save = confirm("Do u really want to save")
    if (save){
    alert("edit confirmed")
    window.document.myForm.action="test.jsp"
    window.document.myForm.submit()
    else
    alert("edit cancelled")
    function confirmDelete() {
    var del = confirm("Do u really want to delete")
    if (del){
    alert("del confirmed")
    window.document.myForm.action="test.jsp"
    window.document.myForm.submit()
    else
    alert("del cancelled")
    </script>
         <form name="myForm">
         <body>
              <table>
              <tr>
              <td colspan="2" align="center"><input type="button" style="background-color: #ffffff" name=save onclick="confirmSAVE()" value="SAVE">
              </td>
              <td colspan="2" align="center"><input type="button" style="background-color: #ffffff" name=delete onclick="confirmDelete()" value="DELETE">
              </td>          
              </tr>
              </table>
         </body>
         </form>
    </html>
    When you confirm edit or delete, the same test page will be displayed.
    Regards,
    Uma
    Message was edited by: Uma Maheswari

  • Cannot load script for the required change in butt...

    I got the email saying Skype will be changed after 15 March.  It says we need the new buttons.  So I go the site, and then there is a big box which says: "cut and paste this" which is:
    <script type="text/javascript" src="http://www.skypeassets.com/i/scom/js/skype-uri.js"></script>
    <div id="SkypeButton_Call_[Removed for privacy]_1">
    <script type="text/javascript">
    Skype.ui({
    "name": "call",
    "element": "SkypeButton_Call_[Removed for privacy]_1",
    "participants": ["[Removed for privacy]"],
    "imageSize": 32
    </script>
    </div>
    So where do I paste this script. Plus I get we need to do on our Ipads as well.

    Hi sheshu0022,
    Based on my research, the issue can be occurred due to something get corrupted in the script task. To fix this issue, please copy the code in the task, then rebuild the script task with the same code to test again.
    The following similar thread is for your reference:
    http://stackoverflow.com/questions/15165760/ssis-script-task-fails-on-server-with-error-cannot-load-script-for-execution
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

Maybe you are looking for