Click event on Button causes components to shift right.

I have a pretty basic photo viewer app. When I click on the 'next' button all the components shift to the right a small, but noticeable amount. When I click the 'previous' button the app does not drift either way immediately. If I click previous twice and then next once it has a cummulative effect of moving the components left 1 space. I have never seen this happen before. Any thoughts?
< mx:Application >
<mx:HBox>
<mx:VBox>
<mx:Button id="prvBt"  click="prevGroup();"
  upSkin="@Embed(source='prev.png')"
      overSkin="@Embed(source='prev_over.png')"
              downSkin="@Embed(source='prev.png')"
  icon="@Embed(source='prev.png')" >
</mx:Button>
<mx:TileList width="120" id="photoList"  height="475" >
<mx:itemRenderer>
<mx:Component>
<mx:Image
horizontalAlign="center"
verticalAlign="center"
source="{data.filename}"
toolTip="{data.name}"
width="100"
height="150" />
</mx:Component>
</mx:itemRenderer>
</mx:TileList>
<mx:Button id="nxtBt" click="nextGroup();"
upSkin="@Embed(source='next.png')"
    overSkin="@Embed(source='next_over.png')"
        downSkin="@Embed(source='next.png')"
        icon="@Embed(source='next.png')" >
</mx:Button>
</mx:VBox>
<mx:VBox>
<mx:ProgressBar id="progressBar" source="{image}" visible="false" />
<mx:Image width="640" height="474" id="image" source="{photoList.selectedItem.filename}"
horizontalAlign="center" verticalAlign="center"
open="progressBar.visible=true" complete="progressBar.visible=false" />
</mx:VBox>
</mx:HBox>
</mx:Application>

Here is the method in question.
endRec, STEPVAL, startRec, X are all integers.
The purpose is to load the next 4 photos in a tilelist component, the photo data is coming from an xml file.
private function nextGroup():void{
endRec = endRec + STEPVAL;
startRec += STEPVAL;
x = startRec;
if(endRec > totalRec)
endRec = totalRec;
if(startRec < STEPVAL)
prvBt.enabled = false;
else
prvBt.enabled = true;
if(endRec >= totalRec)
nxtBt.enabled = false;
else
nxtBt.enabled = true;
tempPhotos.length = 0;
try{
while(x < endRec){
var po:PhotoObject = new PhotoObject();
po.name = photoFeed.photo[x].@name;
po.filename = photoFeed.photo[x].@filename;
tempPhotos.push(po);
x++;
photoList.dataProvider = tempPhotos;
}catch(err:Error){
Alert.show("a Next Error: " + ObjectUtil.toString(err));

Similar Messages

  • On Click event for button not firing

    Hi,
    I'm writing a portlet under Plumtree 5.0.2 and using web controls 2.1 (released version).
    I have a form that has a text box, a label, and a submit button. By cliking on the button the text from the box should appear in the label. If I run the application outside the portal everything seems to work fine, but on the portal the click event does not fire. why?
    I have my ptrender tag on the form, httpmodules in the config file, GetPostBackEventReference on Page_Load. Did I forget something?
    any advice is appreciated. Thanks
    Tania

    Tania,
    You'll need to add ptrender="true"to the button's opening tag if you want the button's server-side code to execute. Also, you won't need ptrender on the form's opening tag.
    From what I can see, placing ptrender on the form's opening tag can be used for two things:(i) when the user clicks a button (which doesn't have ptrender itself) causes the browser to return to the portal, similar to executing portletresponse.ReturnToPortal() in your server-side code.(ii) causing a third-party control to similarly return to the portal as (i) above.
    Nick.

  • Double-clicking the home button causes my iPad 2 to crash

    I am runing iOS 5.1  When I double-click the home button the interface crashes, and it takes me back to the "slide to unlock" screen, with the end result being that I cannot close any open applications.  Has anyone else seen this issue?  I have rebooted my iPad, and this does not make the issue go away.
    iPad 2, 32GB, WiFi only running iOS 5.1.
    Cheers,
    Cole.
    EDIT: So, for testing purposes, I turned on the multi-touch gestures and tried swiping up to bring up the task list.  As soon as I swipe up, it crashes as well, so the problem is not with the home button, but with the task list.
    Cole.

    Don't double-click it! 
    First, try a system reset.  It cures many ills and it's quick, easy and harmless...
    Hold down the on/off switch and the Home button simultaneously until the screen blacks out or you see the Apple logo.  Ignore the "Slide to power off" text if it appears.  You will not lose any apps, data, music, movies, settings, etc.
    If the Reset doesn't work, try a Restore.  Note that it's nowhere near as quick as a Reset.  Connect via cable to the computer that you use for sync.  From iTunes, select the iPad/iPod and then select the Summary tab.  Follow directions for Restore and be sure to say "yes" to the backup.  You will be warned that all data (apps, music, movies, etc.) will be erased but, as the Restore finishes, you will be asked if you wish the contents of the backup to be copied to the iPad/iPod.  Again, say "yes."
    Finally, if the Restore doesn't work, let the battery drain completely.  Then recharge for at least an hour and Restore again.

  • Button Click Event WebPart Button Sys.Webforms.PageRequestManagerServerErrorException:

    Hi,
    I have a SharePoint 2010 visual WebPart, which has ASP.NET Multiview control. When deployed, this control works fine on my local server and it even works fine in the Development server; however, when deployed on to the production server, it stops working.
    I am not able to change Views on the production server, when I try to debug the WebPart in IE Developer Tool (Using IE 11), I get this error that says “Sys.WebForms.PageRequestManagerServerErrorException: An unexpected error has occurred.” in the ScriptResource.axd
    file.
    Even the Button click is not working, getting the same error in the Button Click.
    Can someone help me with this?
    Regards, Vikram

    Hi Hemendra,
    Thanks for your help, but the problem is solved now. turns out the issue was not with the control but the page itself.
    I had copy pasted the pages from my local server to the production server instead of exporting and importing it.
    Once i created pages in the production server, the issue was solved.
    Regards, Vikram

  • On the tab bar, clicking on a button with a "+" to the right of my open tabs would open a new tab. Now, in version 3.6.13, that no longer works

    How can I enable this function again?

    That is a problem with the Ask<i></i>.com toolbar (Tools > Add-ons > Extensions)
    See:
    * [[Troubleshooting extensions and themes]]

  • Right-Click Event Matrix

    Good Morning
    Experts:
    I have added several options(SAP and Custom) to the Right-Click event.  It works as designed when Right-Clicking on the Matrix.  However, when Right-Clicking anywhere else on the screen, the options are still displayed.
    How can I restrict the options to only be displayed when Right-Clicking on a Matrix?
    Thanks,
    EJD

    Hi Ed,
    The right click event is completely separate event (ie it is not an EventType within the ItemEvent).
    So to code it (C#):
    private void _sboApp_RightClickEvent(ref SAPbouiCOM.ContextMenuInfo EventInfo, out bool BubbleEvent)
         BubbleEvent = true;
         if(EventInfo.FormUID == "MYFORM")
              // Do some stuff
    You also need to have defined the event while initialising the application object:
    this._sboApp.RightClickEvent += new SAPbouiCOM._IApplicationEvents_RightClickEventEventHandler(this._sboApp_RightClickEvent);
    There's an example project in the UI section of the SDK samples (number 22).
    Kind Regards,
    Owen

  • HierarchyViewer mouse click event on expansion icon

    Hi,
    I'm using HierarchyViewer in an application. Could you please suggest if I can catch the mouse click event on the expansion icon ["+" sign appearing right below the node]?
    Thank you,
    Nima

    Dear Akash,
    Are you sure about Disclose Listener of the HierarchyViewer??
    I'm using Jdeveloper 11g (11.1.1.5) and HV component doesn't have such listener!

  • Radio button's click event to script both ".presence" and ".mandatory" -- Need help !

    Hi all,
    I've adopted the script stated in HightlightOneRequiredField.pdf so that the print button in my form can detect and prevent null field before pop up the print dialog. It works fine.
    In my form, I've created a mandatory 2-radio buttons group with click event script written, using ".presence", in each button. When user clicks:
    Button A: make subform A visible and subform B invisible;
    Button B: make subform A invisible and subform B visible.
    Apart from the visibility of the subforms, what I want more is to add a .mandatory script (together with the click event) in the buttons to turn some fields' mandatory in the subforms on and off so that when user clicks:
    Button A: will also turn some fields' value type in subform A to be "User
    Entered-Required", whereas some of that in subform B to be "-
    optional";
    Button B: will turn the subform B's fields to "-Required" and subform A's
    fields back to "-optional"
    However no luck with me. When I press the print button after any of the radio buttons checked, the print dialog still show up even the subforms' fields are null as if those fields' value type always remain "-optional"
    I wonder if this problem is caused by Chinese binding name ? The script written in the radio button B is:
    FormA.presence = "invisible";
    FormB.presence = "visible";
    if (B1.mandatory = "disabled")
    B1.mandatory = "error";
    if (B2.mandatory = "disabled")
    B2.mandatory = "error";
    if (B3.mandatory = "disabled")
    B3.mandatory = "error";
    if (A1.mandatory = "error")
    A1.mandatory = "disabled";
    if (A2.mandatory = "error")
    A2.mandatory = "disabled";
    if (A3.mandatory = "error")
    A3.mandatory = "disabled";
    B1, B2 and B3 represent the Chinese fields' binding name in FormB
    A1, A2 and A3 represent the Chinese fields' binding name in FormA
    (The script in radio button A is reversed in this way.)
    Have I done something wrong in the above (click event) javascript?
    Please help.
    Thanks in advance.
    Alex

    Hi all,
    I've adopted the script stated in HightlightOneRequiredField.pdf so that the print button in my form can detect and prevent null field before pop up the print dialog. It works fine.
    In my form, I've created a mandatory 2-radio buttons group with click event script written, using ".presence", in each button. When user clicks:
    Button A: make subform A visible and subform B invisible;
    Button B: make subform A invisible and subform B visible.
    Apart from the visibility of the subforms, what I want more is to add a .mandatory script (together with the click event) in the buttons to turn some fields' mandatory in the subforms on and off so that when user clicks:
    Button A: will also turn some fields' value type in subform A to be "User
    Entered-Required", whereas some of that in subform B to be "-
    optional";
    Button B: will turn the subform B's fields to "-Required" and subform A's
    fields back to "-optional"
    However no luck with me. When I press the print button after any of the radio buttons checked, the print dialog still show up even the subforms' fields are null as if those fields' value type always remain "-optional"
    I wonder if this problem is caused by Chinese binding name ? The script written in the radio button B is:
    FormA.presence = "invisible";
    FormB.presence = "visible";
    if (B1.mandatory = "disabled")
    B1.mandatory = "error";
    if (B2.mandatory = "disabled")
    B2.mandatory = "error";
    if (B3.mandatory = "disabled")
    B3.mandatory = "error";
    if (A1.mandatory = "error")
    A1.mandatory = "disabled";
    if (A2.mandatory = "error")
    A2.mandatory = "disabled";
    if (A3.mandatory = "error")
    A3.mandatory = "disabled";
    B1, B2 and B3 represent the Chinese fields' binding name in FormB
    A1, A2 and A3 represent the Chinese fields' binding name in FormA
    (The script in radio button A is reversed in this way.)
    Have I done something wrong in the above (click event) javascript?
    Please help.
    Thanks in advance.
    Alex

  • Sharepoint 2010 Custom Visual Webpart button click event firing on page refresh

    I have developed a Visual Webpart to create a list in SP using vs2010 and  the button click event I have written the list create method. If I click the button list is created successfully.  And I refresh the page again list is creating(Again button
    click event is triggering).please help me to solve the issue.
     protected void Button1_Click(object sender,
    EventArgs e)
                SPWeb web
    = SPContext.Current.Web;
                //SPList list=web.Lists["Auto"];
                SPList list
    = web.Lists[DropDownList2.SelectedItem.Text];
                if
    (string.IsNullOrEmpty(TextBox1.Text)
    || string.IsNullOrEmpty(DropDownList1.Text))
    Label4.Text =
    "Fields Are Empty";
                else
    if (DropDownList1.SelectedItem.Text
    == "Single line of Text")
                    list.Fields.Add(TextBox1.Text,
    SPFieldType.Text,
    true);
    SPView viewname = list.Views["All Items"];
                    viewname.ViewFields.Add(TextBox1.Text);
    //viewname.Update();
                    list.Update();
    Label4.Text =
    "Field Created Successfully";
    TextBox1.Text =
    string.Empty;
    // Label4.Text = string.Empty;

    Hi,
    This is because the request is sent to the server when you refresh the page.
    A workaround for this is that we can “provide a refresh link that redirects to the same page (or if you have some action causing the refresh programmatically, you could just
    redirect to the page after that, with Response.Redirect)
    so that page is requested by the browser (with GET method, default with hyperlinks)”.
    More information:
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/45648b39-1229-405c-ac9e-60eb82905982/click-event-getting-fired-on-page-refresh
    Or we can use the Session to save a value which used as a flag for us to check whether it is a page refresh and perform accordingly.
    http://www.codeproject.com/Articles/28099/Refresh-Page-Issue-in-ASP-Net
    http://www.codeproject.com/Articles/10240/Detecting-Page-Refresh
    Thanks
    Patrick Liang
    TechNet Community Support

  • Bug? calling javascript click() on a hidden button causes js error on page

    I call the .click() method on a hidden button to cause the page to refresh. This works OK, but when the page comes back up, it has a javascript error on it. It turns out the error is from some javascript that is trying to set the focus on the hidden button that was clicked, which causes an error in IE (This doesn't seem to bother Firefox) .
    While I imagine that there are workarounds, why should the underlying faces architecture be setting the focus to a hidden button?
    It's easy to duplicate:
    Create new page. Add two buttons. For the first, make it invisible (uncheck visible in properties), then cause it to submit a virtual form.
    For the second, add this to the onclick:
    document.getElementById("form1:button1").click();return false;
    Bring up the page, click on the visible button. The page will refresh, and you'll have a nice js error.
    BTW: Obviously, I don't want to click one button from another. What I want is a way to cause an action to happen from javascript. I can't imagine it would work to simply submit a form from javascript, so I use this method. It works fine except for the error. Is there a better way to do this?

    which causes an error in IE (This doesn't seem to bother Firefox) .Vaious browsers behave differently at times when executing javascript code. Many instances of this can be found on the net. This is a browser specific problem.So it's ok to set the focus to a hidden button because firefox is more relaxed about this obvious error than explorer is? When would anyone really want a hidden button to gain focus? What do I tell my users--don't use explorer, because it doesn't like it when faces sets the focus to a hidden button? Ignore the error message you get? What?
    BTW: Obviously, I don't want to click one button from another. >>What I want is a way to cause an action to happen from javascript.Please describe in detail what action you would like to perform from javascript. It is not clear as to what the use case is.
    I don't really see how the use case matters. I gave a very easy example how to duplicate this problem. The reason that I want to do this is that there are many places to enter javascript code that don't allow for an action to be triggered. I have many instances of this. For example, I'd like a mouseover on an edit field to cause an action. I can capture this in javascript, but I can't cause any server side processing. To get around this limitation, I call the hidden button's .click method, which does cause a server side event.
    Here's a simpler, more direct incarnation of this error that doesn't involve javascript.
    Create a new page. Put an element on it, like an edit box. Put a button on the page. For its action, put:
    public String button1_action() {
    getButton1().setVisible(false);
    return null;
    Pressing this button will cause a page refresh, and then a javascript error.
    Use Case: After the user presses the button, they shouldn't be allowed to press or see it again.

  • FileDialog.SAVE: trap the "Save" button click event

    Hello All
    Can anyone help me with FileDialog.SAVE, as to how we could trap the Save button click event? Is it possible to actually trap that particular event, rather than just checking for FileDialog.getFile() == null -> which indicates that "Cancel" button was selected.
    Any help would be highly appreciated
    Regards
    Naushin

    You can not do this, because FileDialog uses native dialog and all
    buttons on it are native (there are no java-components for them).
    Thus checking FileDialof.getFile() for null is only way to figure out
    whether user choose some file or not.

  • How to call elem. Search help on Button click event in WD appilcation

    Hello All,
    i have requirement to call elem. search help on button click event in WD application. currently i am calling FM  F4IF_START_VALUE_REQUEST but getting the short dump as below,
    The following error text was processed in the system X31 : Screen output without connection to user.
    The error occurred on the application server saps_X31_31 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    SYSTEM-EXIT of program SAPLSDH4
    Function: F4_PRESEL_WITH_TABSTRIP of program SAPLSDH4
    Form: F4PROZ_STEP_PRESEL of program SAPLSDSD
    Function: DD_SHLP_SINGLE_STEP of program SAPLSDSD
    Form: F4PROZ_LOOP of program SAPLSDSD
    Form: F4PROZ of program SAPLSDSD
    Function: F4IF_START_VALUE_REQUEST of program SAPLSDHI
    Method: ONACTIONSEARCH_CUSTOMER of program /1BCWDY/50TU5ZEXF3K0IWCWE153==CP
    Method: IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER of program /1BCWDY/50TU5ZEXF3K0IWCWE153==CP
    Method: INVOKE_EVENTHANDLER of program CL_WDR_DELEGATING_VIEW========CP
    is there any way to achieve the required behaviour.
    please let me know.
    Regards,
    Chandra

    Hi Friends,
    I have the similar kind of requirement. Upon click on a Button on screen i need to call a search help, and collect one or more selected material numbers.
    The search help is working fine and i am getting the entries with the following code.
    The problem is i am finding extra popup on screen.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
    tabname         =  space
    fieldname       =  space
    SEARCHHELP      =  'MAT1'
    MULTIPLE_CHOICE =  'X'
    STEPL           =  0
    value           = 'MATNR'
    *dynpprog        =  progname
    *dynpnr          =  dynnum
    *dynprofield     = 'CARRIER'
    CALLBACK_PROGRAM          = 'ZTEST_1_PRA'
    CALLBACK_FORM             = 'F4CALLBACK'
    TABLES
    RETURN_TAB                = RETURN_TAB
    EXCEPTIONS
    FIELD_NOT_FOUND           = 1
    NO_HELP_FOR_FIELD         = 2
    INCONSISTENT_HELP         = 3
    NO_VALUES_FOUND           = 4
    OTHERS                    = 5.

  • How do you fire a button click event on apex page from fancybox iframe that was created by page

    I am trying to fire off the button click event from fancybox iframe. The apex page has a button that launches a fancybox iframe which is loaded with an APEX form. On close of that fancy box, I am trying to fire a click event on the parent page which will refresh a div with html that is created with plsql. The button on the page works as expected when clicked from the page. It will show a debug alert message to prove it was called and then load the div with the correct data. I am unable to fire off this button click from the fancybox iframe when it closes.
    A couple of points:
    I using Plug-in: Execute PL/SQL Code and Return Content ("PLUGIN_MULEDEV.SERVER_REGION_REFRESH") to place the create fancybox statement. It is used to populate a div using plsql.
    The name of the button on the main page is P2020_REFRESH_SECTION_BUILDER_BTN.
    The click dynamic action on the button is calling the plugin to replace the html in the div.
    The data in the form in the fancybox is being saved to the database. On close of the fancybox box I want to refresh the div so the new record is included in the div html.
    Can anyone help. Here is the fancybox code:
      function customProcessOnReadyState4(){
        for (var i=0;i<11;i++){
          $( "#tabs"+i ).tabs();
          $("#createNewExerciseLink"+i).fancybox({
              ''width''         : ''60%'',
              ''height''        : ''70%'',
              ''autoScale''     : true,
              ''transitionIn''  : 200,
              ''transitionOut'' : 200,
              ''type''          : ''iframe'',
              ''onClosed''         : function() {
                                         window.parent.$(''#P2020_REFRESH_SECTION_BUILDER_BTN'').click();
    Here are the dynamic actions assigned to the button:
    5 - Execute JavaScript Code
    alert("Starting refresh");
    10 - Execute PL/SQL Code and Return Content [Plug-in]
    begin
      SCTUI.create_sct_tabs2(:P2020_CREATE_SECTION_LOV, '1');
    end;

    user setActionListener...
    <af:setActionListener from="#{bindings.XXX.inputValue" to="#{backingbean.variable}"
                  <af:inputText value="#{bindings.Email.inputValue}"
                                label="#{bindings.Email.hints.label}"
                                binding="#{backingBeanScope.backing_ShuttlePage.it2}"
                                id="it2">
                    <f:validator binding="#{bindings.Email.validator}"/>
                  </af:inputText>
                  <af:commandButton text="commandButton 2"
                                    binding="#{backingBeanScope.backing_ShuttlePage.cb2}"
                                    id="cb2" action="passing">
                    <af:setActionListener from="#{bindings.Email.inputValue}"
                                          to="#{processScope.detail}"/>
                  </af:commandButton>next jsf page:
                <af:outputText value="#{processScope.detail}"
                               binding="#{backingBeanScope.backing_ProcessScope.ot1}"
                               id="ot1"/>setPropertyListener also should work
    <af:setPropertyListener from="#{bindings.Email.inputValue}" to="#{processScope.detail}" type="action"/>

  • Trying to add a click event to a button...

    Standalone Flex Builder2 fronting ColdFusion. Current line
    count is a whopping 781 lines. If I try to add ANY more click
    events, even to a button, I get:
    <b>ReferenceError: Error #1065: Variable is not
    defined.
    at global/flash. utils::getDefini tionByName( ) </b>
    Notice there is not a name of the Variable in the
    ReferenceError. All I'm trying to do is add:
    click="currentState ='displayFilterP anel'"
    All functions have been set to public. And there are no Class
    definitions on the application. Any thought would be greatly
    appreciated.

    Anyone have an idea on this? I have rebuilt my application
    romoving all subversion hidden files but still get the same error.
    could it be that i changed my remoting destination and use a
    variable now instead of having it in a specific link?
    see:
    http://yakovfain.javadevelopersjournal.com/passing_parameters_to_flex_that_works.htm

  • How to generate barcode on button click event in PDF using adobe livecycle?

    I already created form in PDF file which is validate completely .But , I required generate a barcode of all field of form using custom script on button click event.
    Please give me right way for doing it .
    Thanks in Advance,
    Jaydeep Solanki.

    Hi vijay,
    What project are you doing? Is it Asp.Net project? If so, you'll need to post it in the dedicated ASP.Net Forum
    http://forums.asp.net  for more efficient responses, where you can contact ASP.NET experts.
    Have a nice day!
    Kristin
    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.

Maybe you are looking for

  • How to extract blob from a table and save it as  a file?

    Dear All i have table employee (emp_id number , emp_name varchar2(60) emp_image blob) 1 - i want to extract the emp_image of every employee into a operating system folder c:\images 2 - the file name should be emp_id.gif or emp_id.jpg How can i do tha

  • Error while reading excel file from application server into internal table.

    Hi experts, My requirement is to read an excel file from application server into internal table. Hence I have created an excel file fm_test_excel.xls in desktop and uploaded to app server using CG3Z tcode (as BIN file type). Now in my program I have

  • Delete my Iweb pages off of a former .mac account

    I started a free trial of .mac and published my site on it. I then realized I wanted a different .mac name so I started another account free trial with a the plan of buying it in the near future and now my web page via iweb is on both. I am gonna let

  • Retouching large 16-bit tiff images causes endless processing.

    I have a few high-resolution 16-bit greyscale tiff scans of antique family photos in my Aperture library. The largest file size is 420MB. Since upgrading my library to AP3, editing these images causes Aperture to process endlessly. Aperture doesn't h

  • Sdk environment variables

    I am trying to set the environment path in windows xp, but it does not seem to "take". I took all the standard default settings during install. I have the Path set as: C:\Sun\AppServer\bin; C:\Sun\AppServer\jdk\bin; C:\Program Files\Java\jdk1.5.0_06\