Javascript click events to my UIWebView stop firing after evalJS

I have a Dashcode developed webapp that I ported to a UIWebView object in Xcode. I have a menu in native obj-C that the user can touch, to send messages via evalJS to the webapp. The webapp responds accordingly and changes the view of my stackLayout with setCurrentView. But it usually then stops responding to user clicks. I can still scroll up and down. I can still navigate with the native obj-C nav bar, but nothing from my javascript onClick events. I confirmed as best I can that the events are no longer firing and that its not a javascript code error on my part. It even still works briefly, but then stops working again after a few seconds. I suspect that's just lag in whatever disabled it.
Does the UIWebView disable user interaction with the javascript engine? Or is the javascript engine disabling events? Either way, why is it disabled and what do I do to reenable it? Debugging is very difficult since the two tools don't work well together.

I monitored the isUserActionEnabled property from the UIWebView, and it does not change when the error occurs. When the user touches a button on the native code side, it sends an evalJS command to execute a javascript function called navigationHomeCall(). When I debug this in Dashcode, and call the function in the Evaluator Window, it does the same thing. It stops the javascript from receiving anymore events. However, if I keep calling my navigationHomeCall, navigationBackCall, and navigationForwardCall functions from in the Evaluator Window, the events will eventually start working again. Sometimes it takes 1 or 2 calls before it works. Sometimes more. But once it starts working, another call will stop it working again.
It seems that evalJS can randomly enable or disable javascript events. I looked through the javascript object model to see if what, if any, properties change to cause this but the model is huge, I can only see maybe 20 properties on the screen at a time, and Dashcode keeps changing the window to the Run Log everytime I make the call to invoke the error. It makes troubleshooting very slow.
Has anybody successfully used evalJS and javascript events without any problems? I'm not the first one to try this, am I?

Similar Messages

  • Click event on DVT Line Graph

    Hi,
    Is it possible to attach a javascript click event on a DVT Line graph component?
    I know ADF DVT has clickListener but what happens is that it is triggered only when you click any of the series data but clicking the the column label or row label does not raised any event where I could add logic.
    What I want is that whatever part of the DVT Line graph is component it would call a managed bean method.
    Here's my use case:
    I am showing a list of DVT line graph and user needs to select at least one DVT Line Graph in the list. Clicking one of the Line Graph will highlight the background of that Line Graph.
    Obviously, I will just PPR the surrounding parent component of the selected Line Graph.
    As I have mentioned, the click listener is triggered only when clicking particular series in the graph.
    I am thinking if I could attach a javascript event for this and then fire up a server listener but I could find any information on how to do this.
    Is this possible?
    JDEV 11G PS5

    Bump....any hints? Please?

  • GeoMap click event refresh inline frame

    I am listening to the MapPointTheme click event. When this is fired, I set the source of my second Inline frame to another page (the main page has 2 inline frames, 1 displaying the map, and my second one displaying something else) via a backing bean. The problem is that, the GeoMap component refreshes, and not the second inline frame.
        public void mapClicked(MapClickActionEvent mapClickActionEvent) {
            // Add event code here...
            serviceName = mapClickActionEvent.getDataContent().getLocationName();
            System.out.println("Map clicked service: " + serviceName);
            hostFrameSource = "testPage.jsp?service=" + serviceName;  
            System.out.println("Host frame source: " + hostFrameSource);
            hostFrame.setSource(hostFrameSource);
            AdfFacesContext.getCurrentInstance().addPartialTarget(hostFrame); 
        }I am stuck as I am unsure what I am doing incorrectly.
    Regards,
    Gareth.

    Gareth,
    I don't have a sample for this but what if you surround the inlineFrame in say an af:panelGroup and ppr this group?
    Frank

  • X121e touch pad buttons stop working after a while

    Hello everyone,
    I have a lenovo thinkpad x121e.
    The buttons above the touchpad (for right and left clicking) and also the trackpoint stop working after a while (about 45 min). Although the touchpad itself works without problems.
    If I reboot the operating system (Windows 7, 64-bit version) everything works fine for a while and then the buttons and trackpoint won't respond again.
    It is always the same routine. Rebooting windows, everything alright, stop working, ...
    I am using the newest driver version and de- & reinstalling of UltraNav haven't solved the problem.
    Has anyone an idea what causes my problems with the touch pad buttons and how to solve it? (I guess it's not a hardware problem.)
    Many thanks in advance.

    Hi again, li-lup
    I would recommend trying to use the standard Synaptics driver found here. Synaptics is the company that develops the UltraNav software, so there should be no loss of compatibility/features. I have witnessed several cases where this driver has helped others with mouse issues, so it may help yours as well.
    The first thing you will need to do is to remove the UltraNav driver from the system. To do this, open the Start menu and type Device Manager into the Search box, and then press Enter. Once here, double click on Mouse and other pointing devices, and then right-click on the UltraNav device. Naviage to the Driver tab and select Uninstall... from the bottom of the window. Follow the prompts to uninstall and then restart when prompted by Windows. Windows should install a generic driver that will allow you to use the TouchPad when downloading the Synaptics driver. 
    Hope it helps,
    Adam
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution!" This will help the rest of the community with similar issues identify the verified solution and benefit from it.

  • Some frontpanel controls stop firing the Event Structure

    In my main vi,I have an event structure. I created a subVI that also has an event structure. I load the subvi via a subpanel in my main vi. It runs fine for a while. But sometimes after firing events on the subpanel, most but Not All controls on the main VI stop firing the Main Vi's event structure. The Subpanel's subvi event structure always works fine. When I reload the program it works fine again for a while.

    This is the problem that's been bothering me too (big time actually). Thanks for the insight!
    First of all I love the event structure and it totally changed the way I program labview. Together with the subpanel addition, it makes for very professional looking programs. Here's my version of the same problem:
    I have an event structure on the main VI, and ~20 subpanels. I load various subvi's in the subpanel of the main VI as required. Each subvi has an event structure to handle GUI and incoming user events. I found the problem in the full blown operation, but the problem also appears when I only have one subpanel running, so only one event structure in a subpanel and one event structure in the main program.
    I had the problem with a mouse down on a table, and with a doubleclick on a listbox. And indeed I had an attribute node (reference + property node in my case) to the listbox in the event case that handles the doubleclick. When removing the attribute node, no more buttons will stop to respond on the main panel. When you try to readout or access the listbox in any way in the event case that handles the double-click, it fails. It does not matter whether the "Lock front panel until the case for this event is completed" is true or false. After it fails, you have to unload all the code and reload before LV is able to see some of the buttons on the main panel again (LV7.1.1). You do not have to close LV just the VI's.
    So my first work-around after reading your story was to drive a user event from the doubleclick event case. That user event case then does the stuff I want to do with the listbox. Did not work. I then added a delay of 1000 ms before accessing the attribute node in the other event case, that worked. I then moved all my stuff back into the original event case and added a delay there before accessing the listbox. 100 ms failed, 500 ms works. So at this point I would tend to unexpected behavior from LV which is timing dependent, not "Operator error".
    There is never a problem in any of the ~200 events in the ~20 subpanels. It is always the main panel that is affected. The event handler simply does not "see" some buttons anymore (value change), for example the "mouse down" event would still work for a boolean buttton on the main panel whereas the "value change event" would consistently fail.

  • PopupMenuButton: Can not Stop 'click' event

    Hello Everybody,
    I am working with a PopupMnuButton. The PopupMenuButton is
    skined so the selected value is not visible. The menu has four
    items which when clicked performs respective operations. But when
    the main button of the PopupMenuButton is clicked it performs the
    operation for the first menu item. I wish to stop that from
    happening.
    Going through the help files I found that PopupMenuButton
    dispatches a click event when the main button part of the
    PopupMenuButton is clicked, which further dispatches the itemClick
    event for the last selected index.
    Is there a way around to stop the click event from firing
    when the main button is clicked?
    I dont want any action to take place if the button is
    clicked. The user has to select an item from the menu.
    Please advise.
    Regards,
    Paromita

    Hi Tracy,
    No setting selectedIndex value to -1 did no work as
    slectedIndex is a private property for PopupMenuButton so can't
    access from the application. Whenever, I try clicking the button it
    fires the itemClick. Even could not get the standard change event
    to work....it seems that only itemClick method operates and the
    click on button fires the itemclick event.
    It would be great if anyone could suggest any workaround.
    Thanks and Regards,
    Paromita

  • Pass Mouse click events from JavaScript to Falsh Movie

    Hi,
    I have an interesting problem here.
    i am trying to create a web page which has my
    flash-presentation movie. i need to disable mouse click &
    keyboard click navigation of the flash movie. The only way by which
    i can navigate my slide in the flash movie should be using 2
    buttons say Next & Prev that are i my web page.
    when i click the Next button i should be able to go to the
    next slid or the animation in the same slide like how i do in the
    power Point.
    Is there any way by which i can send these mouse click
    events from my javascript to my flash movie or is there any other
    means by which i can achieve this.
    ~Blackperil

    Hi Mathias,
    What i understood is that you want to triger a server side event (simulate onClick event of button)from a client side event (javascript confirm popup), based on the choice of user..
    You can also try this one...
    Check = confirm("Do you really want to proceed?");
    if (Check == true)
    document.getElementById('do_proceed').click();
    else
    document.getElementById('do_cancel').click();
    Regards,
    Anubhav

  • 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

  • CSS issues....get Javascript error on click event

    Trying to finish up this navbar. Got it where my navigation works pretty much great. However, the code I expected to work when I fire a click event on the logo (represnted currently by a gray circle) causes a 'Javascript error in event handler! Event Type = element' error instead. Not sure why. I know I had an issue with one of my button references (spelling issue) but beyond that, everything seems to be in order.
    This is the code I'm using. The first five lines work right. The second series does not.
    sym.getSymbol("btnVision").$("back").css({opacity: 0})
    sym.getSymbol("btnIndustires").$("back").css({opacity: 1})
    sym.getSymbol("btnResp").$("back").css({opacity: 1})
    sym.getSymbol("btnCommunity").$("back").css({opacity: 1})
    sym.getSymbol("btnDiscovery").$("back").css({opacity: 1})
    var stage = sym.getComposition().getStage()
    stage.$("navVision").css({top: 65});
    stage.$("navIndustries").css({top: 65});
    stage.$("navResp").css({top: 65});
    stage.$("navCommunity").css({top: 65});
    stage.$("navDiscovery").css({top: 65});
    I should mentioned I tried sym.getSymbol for the bottom entries but that simply produced the same exact error. Sign.
    Anyone know what might be causing this? It doesn't seem to make sense to me. Here's the files.
    https://www.dropbox.com/s/xo90u6hvj65ix78/nav.zip

    Hi ladobeugm,
    The error message is rather cryptic, but this occurs when trying to access something not defined, as you already experienced with your misspelling.
    You should use Firebug to localize the error via step by step execution. There is a Scripts tab. In its menu, select <youProject>Actions.js. Then, define a breakpoint by clicking in the line number of statement var stage= etc. In the Spies area, you can look for the offending statement by monitoring variable values.
    Gil

  • Double Click Event not fired for IE 11 with compatibility mode for HTML elemnt table

    Hi,
    I am facing an issue with Double click event(not getting fired on double click of mouse) for IE 11 with compatibility mode on HTML element "table" for Windows 7 64 bit machine.It runs fine on IE 10 with compatible mode with Windws 7 64  bit
    machine -- double click event.
    Can you please help to resolve the issue?
    Thanks and Regards,
    Yogesh

    Hi,
    f12>Debug tab, click the 'start' button.....(select break on all exceptions from the dropdown on the Debug tab)
    click your table and correct any errors that are listed in the Console of the developer tool.... probably you are using attachEvent I/o addEventListener. You should be using addEventListener for IE9 and higher and other web browsers.(it the w3c standard
    (recommendation).
    Post questions about html, css and scripting for website developers to the MSDN IE Web Development forum. Include with your question a link to your website or a mashup that shows the issue.
    Rob^_^

  • Triggering a click event on an AdfRichCommandButton via JavaScript

    Hi,
    I have created a standard JAAS login page. To get it to work, I had to create a HTML <tt><form></tt> tag surrounded by a <tt><f:verbatim></tt> component. It works perfectly fine, except that there is no default button. In other words, it is not possible to submit the form by pressing enter. I'm looking for a way to add this functionality, I'll probably need to create som JavaScript, that usually would have been created by the <tt><af:form></tt> component.
    This is how my page is defined now:
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
              xmlns:c="http://java.sun.com/jsp/jstl/core"
              xmlns:trh="http://myfaces.apache.org/trinidad/html">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document title="Login" id="d1"
                     theme="dark">
          <f:facet name="metaContainer">
            <f:verbatim>
              <script type="text/javascript">
              // JavaScript goes here...
              </script>
            </f:verbatim>
          </f:facet>
          <af:showPopupBehavior popupId="p1" triggerType="load"/>
          <f:verbatim>&lt;form action="j_security_check" method="POST"&gt;</f:verbatim>
          <af:popup id="p1" contentDelivery="immediate">
            <af:panelWindow id="pw1" title="Login"
                            closeIconVisible="false">
              <af:panelFormLayout id="pfl1">
                <af:inputText label="User name:"
                              required="true" id="j_username">
                  <af:clientListener type="keyPress" method="checkEnter"/>
                </af:inputText>
                <af:inputText label="Password:"
                              required="true" id="j_password" secret="true"
                              rows="1">
                  <af:clientListener type="keyPress" method="checkEnter"/>
                </af:inputText>
                <af:panelLabelAndMessage label="" id="btnbr">
                  <af:commandButton text="Login" id="lb"
                                    accessKey="L"/>
                </af:panelLabelAndMessage>
              </af:panelFormLayout>
            </af:panelWindow>
          </af:popup>
          <f:verbatim>&lt;/form&gt;</f:verbatim>
        </af:document>
      </f:view>
    </jsp:root>As you can see, I have added a <tt><af:clientListener></tt> to each of the inputs. I've created a little JavaScript function to detect if the enter key is pressed:
    function checkEnter(e) {           
      var characterCode            
      e = event;
      characterCode = e.keyCode;     
      if(characterCode == 13){    
        document.forms[0].submit() 
        return false
      } else {
        return true
    }This works on IE, but not on FireFox. And it has the disadvantage that the "Login" button doesn't get disabled as soon as Enter is pressed. I tried to replace the <tt>document.forms[0].submit()</tt> part by something like this:
    comp = AdfPage.PAGE.findComponent('lb');
    comp.click();But nothing happens. I searched the documentation, but I can't find a way to trigger a click event on a AdfRichCommandButton. Does anyone have an idea how I could accomplish that the Login button is clicked if the user presses enter?
    Best regards,
    Bart Kummel
    Edited by: Bart Kummel on Oct 21, 2009 9:29 AM

    Hi,
    there might be problem with popup. for me this login page works (and without f:verbatim). but of course without popup effect and seems like validation also doesn't work:
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
              xmlns:c="http://java.sun.com/jsp/jstl/core"
              xmlns:trh="http://myfaces.apache.org/trinidad/html">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document title="Login" id="d1"
                     theme="dark" initialFocusId="j_username">
          <f:facet name="metaContainer">
          </f:facet>
          <form action="j_security_check" method="POST">
            <af:panelStretchLayout id="psl1" startWidth="50px" endWidth="50px"
                                   topHeight="50px" bottomHeight="50px">
              <f:facet name="bottom">
                <af:spacer width="10" height="10" id="spacer3"/>
              </f:facet>
              <f:facet name="center">
                <af:panelBox text="Login" id="pb1" showDisclosure="false"
                             inlineStyle="width:300px; height:150.0px;">
                  <f:facet name="toolbar"/>
                  <af:panelFormLayout id="pfl1">
                    <af:inputText label="User name:" required="true"
                                  id="j_username"/>
                    <af:inputText label="Password:" required="true" id="j_password"
                                  secret="true" rows="1"/>
                    <af:panelLabelAndMessage label="" id="btnbr">
                      <af:commandButton text="Login" id="lb" accessKey="L"/>
                    </af:panelLabelAndMessage>
                  </af:panelFormLayout>
                </af:panelBox>
              </f:facet>
              <f:facet name="start">
                <af:spacer width="10" height="10" id="s1"/>
              </f:facet>
              <f:facet name="end">
                <af:spacer width="10" height="10" id="spacer2"/>
              </f:facet>
              <f:facet name="top">
                <af:spacer width="10" height="10" id="spacer1"/>
              </f:facet>
            </af:panelStretchLayout>
          </form>
        </af:document>
      </f:view>
    </jsp:root>regards,
    Branislav

  • Click event on a item renderer stops data being passed

    Hi
    I'm trying to create a item renderer based on a Canvas, this renderer is then used in a List component. I'm trying to get a click event fired when the user clicks on one of the items in the List. I'm also formatting the data being passed into the item renderer to do this I'm overriding the set data property like this:
    override public function set data(value:Object):void
    title.text = value.marketName;
    sellPrice.text = value.sellPrice;
    buyPrice.text = value.buyPrice;
    change.text = value.percentageChangeOnDay;
    var i:String = "-";
    if(String(value.percentageChangeOnDay).indexOf(i))
    change.styleName = "PositiveChange";
    else
    change.styleName = "NegativeChange";
    When I add a click event to my item renderer like this,
    <view:DisplayItem click="itemClickedEvent( event )" />
    I get a null reference error in my set data function. If I remove the click event the data is passed correctly, I've also found that if I use a rollOut event like this,
    <view:DisplayItem rollOut="rolledOverEvent( event )"/>
    the data is passed fine and the event works too, it seems that click events cause the data not to be passed.
    Why does having a click event cause this problem? How can I have a click event on the item renderer and still format my data?
    Cheers
    Stephen

    Found out that I can use the itemClick event of the List component I'm using my item renderer in, so really my item renderer does not need a click event.

  • How to trigger the "click" event using javascript in LC8?

    I have 2 button in the form. I don't want the user to click the button1 directly (invisible now). but I want the user click the button2 and then do some checking. after checking is finisined,  the script will continue to trigger the button1 "click" event. How to trigger the button1 "click" event through javascript in LC 8? Thanks.

    button2.execevent("click");

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

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

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

  • 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.

Maybe you are looking for

  • Adobe Media Encoder Rendering Issues

    Ok so I am using Adobe Media Encoder version 7.2.2.29. I have been having issues with encoder for awhile now. When I go to queue my videos the encoder doesn't render the file correctly either it be like the example below where a simple imported logo

  • Scrollbar does not work in PDF documents

    When FF opens an PDF document the scrollbar does not work. If it is a one page document I can use Page up/Page down to toggle between top and bottom of page. If it is a multiple page document I can use PageUp/Page down and the arrow keys.

  • Update former versions of data

    Hi, is it possible to update the former versions of data without creating workspaces. Thank you in advance.

  • Documenting EUL and Workbook information

    Recently, my current client asked me if there was any easy way to document all the EUL information in one file. I generated the below pdf document Check this http://www.appsbi.com/discoverer_eul_snapshot_report.pdf Sample Discoverer EUL and Workbook

  • HP 7520 eprint services error

    HP 7520 printer on Windows XP, I get the following error when trying to access eprint services: Ajax submit failed: error =403, Forbidden. Any suggestions? This question was solved. View Solution.