Problem with JavaScript getPageNumWords

Using AR7.0.9. I have a problem with the JavaScript method doc.getPageNumWords and the associated machinery for keeping
track of the words on a page. And I'm wondering if it's a bug,
or something which is not properly defined by the PDF spec.
The situation is illustrated by the test file:
http://www.amrita-cfd.org/4adobe/word-count/test1.pdf
It would appear that the word machinery is aware of
the text in the /Xform's used by /Widget annotations.
But the text is locked in the first time the
machinery is activated on a page i.e. visible /Widget's
are included and invisible ones are ignored.
But since /Widget's can be turned on and off
it's then possible for the word-cache to become out of sync
with respect to the visible text on the page.
Note that a widget which is invisible when
the document is opened, but visible when
doc.getPageNumWords is first called is included
in the word list i.e. the word-cache is computed
once in a just-in-time fashion.
Is the above a known problem, or an inconsistency that has
not been considered before? One solution would be
to add an optional parameter to getPageNumWords
that would force the word-cache to be recomputed,
when needed. Thus removing the need to keep automatic
track of which widgets to include and exclude.
James Quirk

Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
*Don't make any changes on the Safe mode start window.
*https://support.mozilla.org/kb/Safe+Mode
*https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

Similar Messages

  • Problem with Javascript and opening a new page

    Hi,
    I'm developping a website with Java Server Faces.
    I've a problem with JavaScript.
    I have a table, and each row of that table, has a button, to display more information about that specific row. I want to display this information in a new window. For this I want to use JavaScript.
    The new window, of course, needs some information of the other window, to show the right data.
    The first time I click the 'more-information-button', it works perfectly, but from than on, he keeps showing the same information...
    Here is my jsp-page of the first page (the one with the table):
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page">
        <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
        <f:view>
             <f:loadBundle basename="languages.MessageBundle" var="bundle"/>
            <html>
                <head>
                    <meta content="no-cache" http-equiv="Cache-Control"/>
                    <meta content="no-cache" http-equiv="Pragma"/>
                    <title>- UCV-Period -</title>
                    <link href="resources/stylesheet.css" rel="stylesheet" type="text/css"/>
                </head>
                <body style="-rave-layout: grid">
                        <h:dataTable binding="#{UcvPeriod.dataTable1}" headerClass="list-header" id="dataTable1" rowClasses="list-row-even,list-row-odd" rows="5"
                            style="left: 24px; top: 168px; position: absolute" value="#{UcvPeriod.dataTable1Model}" var="currentRow">
                            <h:column binding="#{UcvPeriod.column1}" id="column1">
                                <h:outputText binding="#{UcvPeriod.outputUcvPeriod}" id="outputUcvPeriod" value="#{currentRow['UCVPERIOD']}"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{UcvPeriod.outputText2}" id="outputText2" value="#{bundle.ucvPeriod_columnHeader_ucvPeriod}"/>
                                </f:facet>
                            </h:column>
                            <h:column binding="#{UcvPeriod.column11}" id="column11">
                                <h:commandButton action="#{UcvPeriod.btnDetails_action}" binding="#{UcvPeriod.btnDetails}" id="btnDetails" value="+" onclick="window.open('Details.jsp')"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{UcvPeriod.outputText21}" id="outputText21" value=""/>
                                </f:facet>
                            </h:column>
                        </h:dataTable>
                    </h:form>
                </body>
            </html>
        </f:view>
    </jsp:root>Here is my action, when someone clicks on the 'more-information-button':
    public String bthnDetails_action() {
       Object s = outputUcvPeriod.getValue();
       BigDecimal ucvPeriod = (BigDecimal)outputUcvPeriod.getValue();
       this.getSessionBean().setUcvPeriod(new Integer(ucvPeriod.intValue());
       return "detail_ucvperiod";
    }Here is my constructor of the Detailspage.
        public Details() {
             this.txtUcvPeriod.setValue(this.getSessionBean().getUcvPeriod());
        }Here is the navigation part for this part of my faces-config.xml .
    <navigation-rule>
       <from-view-id>/UcvPeriod.jsp</from-view-id>
       <navigation-case>
           <from-outcome>detail_ucvperiod</from-outcome>
           <to-view-id>/UcvPeriod.jsp</to-view-id>
       </navigation-case>
    </navigation-rule>Thx a lot....
    Anneke

    See the tutorial "Sharing Data Between Two Pages" at http://devservices.sun.com/premium/jscreator/standard/learning/tutorials/data_sharing_twopages.html and the FAQ "How can I pass data between pages without creating SessionBean variables in Creator?" at http://devservices.sun.com/premium/jscreator/standard/reference/faqs/technical/javasource/passing_data.html. Since you can open a new window when your button is clicked, the tutorial and FAQ will explain ways to pass your data to the new window.

  • Problem with JavaScript in URL iView

    Hi,
    I am facing a problem with javascript when i am trying to access my application through URL iView. In the javascript window.top is used to access the frames in the window. But the EP is not recognizing it as valid. what exctly the problem and please suggest me a solution.
    Ashok.

    Hi,,
    thanks for the quick reply. But what i asked was different. I will put it in different way. I have deployed a application in Web Application Server and trying to access it through URL iView. My application is pure J2EE application with html,jsp and JS files. In javascript we used window.top property of the java script which is working fine MS IE. The problem is window.top is a IE specific property which is not having any equallent open standerd so EP is throwing a java script error. As I know the only possible solution for this problem is inherating IE rendaring capabilities to iView(i.e iFrame). is there any way to do that?
    Ashok.

  • JSF problems with Javascript

    Hi everyone!!
    The situation is this: I have a datable with one of its columns make an h:commanLink, which has two f:params, its actionListener is a function of a ManagedBean. This is JSF, not MyFaces. In IE, When the link is pressed, it shows a javascript error: " 'elements.idVar' is null or it's not an object ", however in Firefox, it works perfectly. I have been looking for the problem and it have to do with this:
    </form><a href="# onclick="clearFormHiddenParams_formResultado('formResultado');document.forms['formResultado'['formResultado:_idcl'].value='formResultado:dtTablaResultados:0:_id10';document.forms['formResultado']['idVar'].value='37';document.forms['formResultado']['idMun'].value='168'; document.forms['formResultado'].submit(); return false;"><span id="formResultado:dtTablaResultados:0:itColumna3" title="AREA COSECHADA EN CULTIVOS PERMANENTES">1,230</span></a></td>
    </tr>
    <tr class="standardTable_Row2">
    <td><span id="formResultado:dtTablaResultados:1:itColumna1" style="text-align:center;" title="C&oacute;digo Municipio">718</span></td>
    <td><a href="javascript:void(0)" onclick="javascript:window.opener.opener.showLink('SASAIMA')"><span id="formResultado:dtTablaResultados:1:itColumna2_l" title="Municipio">SASAIMA</span></a></td>
    <td><form id="formResultado:dtTablaResultados:1:_id9" method="post" action="/ConsultaEstadisticasGeo/resultadoConsulta.jsf" enctype="application/x-www-form-urlencoded">
    <input type="hidden" name="com.sun.faces.VIEW" id="com.sun.faces.VIEW" value="_id39:_id41" /><input type="hidden" name="formResultado:dtTablaResultados:1:_id9" value="formResultado:dtTablaResultados:1:_id9" /><input type="hidden" name="idVar" /><input type="hidden" name="idMun" /><input type="hidden" name="formResultado:_idcl" />
    <script type="text/javascript">
    <!--
    function clearFormHiddenParams_formResultado_dtTablaResultados_1__id9(curFormName) {
    var curForm = document.forms[curFormName];
    curForm.elements['idVar'].value = null;
    curForm.elements['idMun'].value = null;
    curForm.elements['formResultado:_idcl'].value = null;
    //-->
    </script>
    the way JSF manage the params. The error, acdording to the message shonw by IE is in this line: curForm.elements['idVar'].value = null;
    The code of the JSP is this:
    <h:commandLink     actionListener="#{consultaEstadisticasMB.detalleEstadistica}">
         <f:param name="idVar" value="#{consultaEstadisticasMB.idColumna3}" id="idVar" />
         <f:param name="idMun" value="#{registro[0]}" id="idMun" />
         <h:outputText title="#{consultaEstadisticasMB.columna3}" id="itColumna3" value="#{registro[2]}" />
    </h:commandLink>
    Waht can i do? (Not using MyFaces, because I can�t do that)
    Thanks for your answers!!

    I have run into this same problem with javascript and the colon. I am not sure if the colon is a valid character for a javascript identifier (one would think the RI developers would have checked it out though!?!).
    Anyway, my workaround is to search through the Javascript DOM for the widget you want to obtain a reference to, using part of its id. After all, you know its id, you just can't use it as a javascript reference. In your Javascript code, do something like:
        var inputWidgets = document.getElementsByTagName("input");
        var targetInput;
        for(var i = 0; i < inputWidgets.length; i++)
           var inputId = inputWidgets.id;
    if(inputId.indexOf("yourInputId") != -1)
    targetInput = inputWidgets[i];
    break;
    It's a lot of effort to just get a reference to a form widget....but it works (I pasted in the code and changed it a bit, so it might not work as is, but at least it demonstrates the idea).

  • Webcontrol problems with javascript

    Hello,
    the page I want to navigate making me problems in my webcontrol. The same page works fine if I go there manually with the Internet Explorer. I force webcontrol to use another IE version than default. I changed regedit >
    HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION
    and a new key for my application with value 2af8(11000)
    If I do not force this version the used version in the webcontrol seems to be to old.
    I think that my application does not use the settings of my IE because if I use IE manually it works.
    I used Google and I can not find a property to force the webcontrol to activate javascript - it seems that I have to change this by the "global" settings.
    Edit: I do not exactly know if its javascript. The error is a script error.
    It does not help to suppress this errors - the page is not working correctly

    Hello,
    in the meantime I tried GeckoFX to solve the issue, but I get another problem later so I come back to the native webcontrol. To get help I will translate the error message because I can not attach a screenshot
    "Scripterror
    URL: http://www.transerv2000.de/DesktopModules/SNITNET_Metrix/js/rma_main.js
    Do you want to continue? Yes / No"
    Because I see the .js I think that this is an issue because of javascript.
    If I navigate to this site and do some work I have no problems. This is why I think that the used IE in my webcontrol is having other settings?!
    Please help and thanks alot.
    Edit: If I supress javascript errors, I got not Messagebox but the content dont work - so I really think that it is a problem with javascript. As I said, if I use the IE as application the page works fine.

  • Problem with Javascript in JSP

    Hi Guys,
    I have this problem with my JSP page. I am using a javascript function
    which calls a function within a bean. The problem that I have is that I get an error when trying to call the following function :
    function refDataTypes_onchange()
    Vector empNames = DBQuery.getResult();
    I get a runtime error at the line Vector empNames = DBQuery.getResult;
    Any ideas would be much appreciated.
    Below is the whole code:
    Thanks in advance
    FRank
    <%@ page contentType="text/html;charset=WINDOWS-1252"%>
    <%@ page import="java.util.*, java.lang.*" %>
    <%-- Declare the java bean for the countries to be queried --%>
    <jsp:useBean id="DBQuery" class="DBQuery" scope="page" />
    <%-- Bean property searchCondition is not set to query countries --%>
    <jsp:setProperty name="DBQuery" property="searchCondition" />
    <%
    Vector empNames = DBQuery.getResult();
    %>
    <HTML>
    <BODY BGCOLOR="GREY">
    <SCRIPT LANGUAGE="JavaScript1.1">
    function refDataTypes_onchange()
    Vector empNames = DBQuery.getResult();
    </SCRIPT>
    <FORM NAME = form1>
    Please enter in the following details
    <p>
    Reference Type :::====
    <select name="refDataTypes" onchange="refDataTypes_onchange()">
    <option value ="1"></option>
    <% for(Enumeration enum = empNames.elements();enum.hasMoreElements();)
    String nextEmpName = (String)enum.nextElement();
    %>
    <option value =<%=nextEmpName%>><%=nextEmpName%></option>
    <%
    %>
    </select>
    <BR>
    <BR>
    Emp No
    <INPUT TYPE="text" NAME=txtAge >
    <BR>
    <BR>
    <INPUT TYPE="button" VALUE="Check Details" NAME=butCheckForm >
    </FORM>
    </BODY>
    </HTML>

    Thanks dimadoo
    I need my JSP to do the following :
    When a user selects a option from a select list. There is a textfield which I want to populate based on the option that thas been selected from the list.
    I tried the following :
    <% Vector empNames = DBQuery.getResult(); %>
    and it does not even go into the bean.
    Will this work if I refresh the page?

  • Problem with JavaScript snipet that DreamWeaver is writing

    I am having a problem with code that DreamWeaver (CS3) is
    writing. I'm fairly certain the problem is in a small piece of
    JavaScript that DreamWeaver is composing.
    This is a fairly complex problem, so bear with me.
    First - What I am trying to make happen: When on a page on my
    site (the-oilman.com) I want a link that opens a new window in the
    on-line store at a different site (AMSOIL.com). I need to leave
    both the page on my site open and have this 'store' page open.
    First of all this is working fine, using the 'Open Window'
    'behavior' in DreamWeaver. If someone wants to change windows (or
    tabs) and go back to my page, leaving the 'store' window open also
    - the problem is set up to happen. If from back at my site, you
    click on the same or a different link that goes back to the 'store'
    either on the same page or a different page at AMSOIL.com - the
    'store' window goes to the correct page, but the 'store' window
    does NOT come on top. When they click on a link to go back to the
    'store' I need the 'store' window to come to the top. If they have
    previously put something in the cart, and come back and add
    something else to the cart in the 'store' by coming in from
    different links on my site the 'store' is working correctly because
    I leave it open the whole time.
    snipets of code that DreamWeaver is writing for my site
    (the-oilman.com):
    from the head:
    <script>
    <!--
    CSAct[/*CMP*/ '129AABC1'] = new Array(CSOpenWindow,/*URL*/ '
    http://www.amsoil.com/redirect.cgi?zo=52257&page=store','store',0,0,true,true,true,true,tr ue,true,true);
    CSAct[/*CMP*/ '129AAC63'] = new Array(CSOpenWindow,/*URL*/ '
    http://www.amsoil.com/redirect.cgi?zo=52257&page=store','store',0,0,true,true,true,true,tr ue,true,true);
    CSAct[/*CMP*/ '10D39F40'] = new Array(CSOpenWindow,/*URL*/ '
    http://www.amsoil.com/redirect.cgi?zo=52257&page=storefront/sso','store',0,0,true,true,tru e,true,true,true,true);
    function MM_openBrWindow(theURL,winName,features) { //v2.0
    window.open(theURL,winName,features);
    //-->
    </script>
    code from 2 different links that is using this script:
    <a href="
    http://www.amsoil.com/redirect.cgi?zo=52257&page=storefront/sso"
    target="store" onClick="MM_openBrWindow('#','store','')"
    csclick="10D39F40">Buy Now</a>
    <a href="
    http://www.amsoil.com/redirect.cgi?zo=52257&page=store"
    title="AMSOIL Store at AMSOIL.com" target="store"
    onClick="MM_openBrWindow('http:www.amsoil.com/redirect.cgi?zo=52257&amp;page=store','stor e','')">On
    Line Store</a>
    I believe what I need is a longer javascript. Instead of just
    "window.open" I need an "if" but my javascript knowledge is very,
    very limited.
    I need it to first check that if the window named 'store' is
    open then 'focus' it, or if it is not open to open the window named
    'store'.
    Will this fix my problem? If so, please help me write the
    lines of code to do it.
    If this isn't the solution, what is the problem and the
    solution?
    A separate question but related: if you look in the two
    different links codes, in the function call one of them uses a
    'null' page reference and the other repeats the full link reference
    from the href= . Both seem to work, but which is the correct or the
    preferred syntax. My guess is there are some browsers that this
    will give a problem, but which way is preferred.
    Don Dawson
    mailto:[email protected]

    Create a new page. Try to apply this same behavior to a link
    on that new
    page. Look at the code. Can you reproduce the problem there?
    The code you
    show below has oodles of GL stuff in it. Do you need that GL
    markup?
    What operational sequence did you go through to get this
    behavior call?
    onClick="MM_openBrWindow('#','store','')"
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "pad graphics" <[email protected]> wrote in
    message
    news:[email protected]...
    >I am having a problem with code that DreamWeaver (CS3) is
    writing. I'm
    >fairly
    > certain the problem is in a small piece of JavaScript
    that DreamWeaver is
    > composing.
    >
    > This is a fairly complex problem, so bear with me.
    >
    > First - What I am trying to make happen: When on a page
    on my site
    > (the-oilman.com) I want a link that opens a new window
    in the on-line
    > store at
    > a different site (AMSOIL.com). I need to leave both the
    page on my site
    > open
    > and have this 'store' page open. First of all this is
    working fine, using
    > the
    > 'Open Window' 'behavior' in DreamWeaver. If someone
    wants to change
    > windows (or
    > tabs) and go back to my page, leaving the 'store' window
    open also - the
    > problem is set up to happen. If from back at my site,
    you click on the
    > same or
    > a different link that goes back to the 'store' either on
    the same page or
    > a
    > different page at AMSOIL.com - the 'store' window goes
    to the correct
    > page, but
    > the 'store' window does NOT come on top. When they click
    on a link to go
    > back
    > to the 'store' I need the 'store' window to come to the
    top. If they have
    > previously put something in the cart, and come back and
    add something else
    > to
    > the cart in the 'store' by coming in from different
    links on my site the
    > 'store' is working correctly because I leave it open the
    whole time.
    >
    > snipets of code that DreamWeaver is writing for my site
    (the-oilman.com):
    > from the head:
    > <script>
    > <!--
    > CSAct[/*CMP*/ '129AABC1'] = new
    Array(CSOpenWindow,/*URL*/
    > '
    http://www.amsoil.com/redirect.cgi?zo=52257&page=store','store',0,0,true,true,t
    > rue,true,true,true,true);
    > CSAct[/*CMP*/ '129AAC63'] = new
    Array(CSOpenWindow,/*URL*/
    > '
    http://www.amsoil.com/redirect.cgi?zo=52257&page=store','store',0,0,true,true,t
    > rue,true,true,true,true);
    > CSAct[/*CMP*/ '10D39F40'] = new
    Array(CSOpenWindow,/*URL*/
    > '
    http://www.amsoil.com/redirect.cgi?zo=52257&page=storefront/sso','store',0,0,tr
    > ue,true,true,true,true,true,true);
    > /
    > function MM_openBrWindow(theURL,winName,features) {
    //v2.0
    > window.open(theURL,winName,features);
    > }
    > //-->
    > </script>
    >
    > code from 2 different links that is using this script:
    > <a href="
    http://www.amsoil.com/redirect.cgi?zo=52257&page=storefront/sso"
    > target="store" onClick="MM_openBrWindow('#','store','')"
    > csclick="10D39F40">Buy
    > Now</a>
    > <a href="
    http://www.amsoil.com/redirect.cgi?zo=52257&page=store"
    > title="AMSOIL
    > Store at AMSOIL.com" target="store"
    >
    onClick="MM_openBrWindow('http:www.amsoil.com/redirect.cgi?zo=52257&amp;page=sto
    > re','store','')">On Line Store</a>
    >
    > I believe what I need is a longer javascript. Instead of
    just
    > "window.open" I
    > need an "if" but my javascript knowledge is very, very
    limited.
    > I need it to first check that if the window named
    'store' is open then
    > 'focus'
    > it, or if it is not open to open the window named
    'store'.
    > Will this fix my problem? If so, please help me write
    the lines of code to
    > do
    > it.
    > If this isn't the solution, what is the problem and the
    solution?
    >
    > A separate question but related: if you look in the two
    different links
    > codes,
    > in the function call one of them uses a 'null' page
    reference and the
    > other
    > repeats the full link reference from the href= . Both
    seem to work, but
    > which
    > is the correct or the preferred syntax. My guess is
    there are some
    > browsers
    > that this will give a problem, but which way is
    preferred.
    >
    > Don Dawson
    > mailto:[email protected]
    >

  • Problem with javascript/PHP/ oracle 10g smart quotes

    I have a problem with my php form that passes the text field to a javascript object. When I copy text from MS Word that includes smart quotes, the form inputs that into the database as ? (upside down) marks. The charset of the DB is WE8MSWIN1252. How do I store these smart quotes as regular quotes? And also if I can do any conversions on the front end (js or php). I tried doing some conversion but to no avail. Any help would be appreciated thank you. “double”

    Decide if you want your HTML pages in Windows code page 1252 or Unicode UTF-8. Then, make sure the pages are properly tagged as either "text/html;charset=windows-1252" or "text/html;charset=utf-8". Use HTTP header Content-type or the corresponding <META HTTP-EQUIV=...> tag. Then, set NLS_LANG environment variable for your PHP engine to either AMERICAN_AMERICA.WE8MSWIN1252 or to AMERICAN_AMERICA.AL32UTF8, depending on which encoding you selected for your HTML.
    -- Sergiusz

  • Problem with JavaScript code in Page Attributes, modal popup...

    Hello all!
    I'm encountering a problem with a modal popup I wrote in JavaScript.
    h3.
    The situation*
    A user sees an interactive report with rows that are clickable, so these rows are links. Upon clicking the name of something in a row, some items get a certain value and a modal popup shows on the screen. In this modal popup, there are details regarding that particular row the user has clicked, but the problem_ here is...
    The modal popup closes itself only seconds after it has been opened.
    This must be because I've probably made a mistake somewhere in my code, but I just can't figure out where... It also appears that when I click on a row link, the popup shows, but the progress bar of my toolbar seems to show a loading bar (as if I refreshed the page).
    h3.
    My code*
    This code is located in the _"Function and Global Variable Declaration"_ part, under the _"JavaScript"_ tab. Code is in the _"Page Attributes"_ of my page 24.
    function showhide(x){
    $x('REGION1').style.display = ( x == 'REGION1') ? 'block' : 'none';
    $x('REGION2').style.display = ( x == 'REGION2') ? 'block' : 'none';
    $x('REGION3').style.display = ( x == 'REGION3') ? 'block' : 'none';
    $( function(){
      $('#ModalForm').dialog(
         modal: true,
         autoOpen: false,
         width: 500,
         height: 350,
         buttons:{ Close: function(){closeForm();}        
    function openForm()
        $('#ModalForm').dialog('open');
    function closeForm()
        $('#ModalForm').dialog('close');
        $(document).ready(function() {
            $('a.temppop').click(function() {
                openForm();
        });This code is located in the _"Header Text"_ part, under the _"Header"_ tab. Code is in the _"Page Attributes"_ of my page 24.
    <link rel="stylesheet" href = "http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/base/jquery-ui.css" type="text/css" />
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"> </script>
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js"> </script>This code is located in the _"Column Link"_ part, you get there by going to the _"Report Attributes"_ of the region called _"Template overview"_ on page 24. This region is an interactive report.
    Link Text: #FOODTEMPLATENAME#
    Link Attributes: class="temppop"
    Target: Page in this Application
    Page: 24
    Item 1, name: P24_MEALID; item 1, value: #MEALTYPEID#
    Item 2, name: P24_TEMPLATEID; item 2, value: #FOODTEMPLATEID#So basically I call the function to open the modal popup by the class name. When a link with that class name in it is clicked, it opens the popup.
    To remind you of the problem, the modal popup closes seconds after it has been opened. How do I fix this?
    Thanks in advance.
    (APEX version 4.1.1.00.23)

    Come on guys... I really need to know this. :(

  • Problem with JavaScript in DPS

    Hello,
    i have little problem with one HTML page in DPS. We've created HTML form, which is formatting output with JavaScript and then passing to local mail client via mailto. It works nicely in Safari on desktop, it works in Safari on iPad BUT it don't work in DPS, when we use it as HTML content (frame on page where form is loaded). Unfortunately, there is no way how to learn what's wrong - on iPad it works, it's not working just in DPS (and it's not working in Viewer on desktop too).
    Anyone have any idea what to do?
    Script is fairly simple, it's my compilation of other works, because i'm not JS programmer, just i'm skilled with google-copy-paste... So there can be some VERY trivial error, but i don't know correct syntax...
    very simple version of this form, which is not working in DPS (but everywhere else), is here
    http://dl.optio.cz/mailtoExample.html
    Thanks for any help!

    Hello,
    when used in DPS browser, it's working (as part of HTMLresources.zip). I don't know if this will help, but here is small game, which works correctly in DPS in web overlay. when you move any red circle, it will let you send results via email. But this is too complicated for my minimal skills.
    http://dl.optio.cz/Hra_en/
    Anyway, thanks for help
    Martin

  • Problem with javascript cookies and frames in Safari

    I have a web page with 2 frames in it. One frame holds a pulldown menu for quick navigation, which changes the content in the other frame and also writes a cookie that makes that choice the default when the user comes back to the web page. My problem is that when the page that has the navigation is in frames it will not change the cookie when the navigation choice is changed. It will only change the cookie if the navigation page is displayed on its own web page (not in frames). The javascript works fine in both FireFox and Google Chrome. It's only Safari that has this problem. Is this a bug in Safari, or do I need to code this differently? I also tried putting the javascript function in the main index.html page that sets up the frames, but that didn't help either.

    HI Patrick,
    Try posting in the Apple Technoligies forums here.
    http://discussions.apple.com/forum.jspa?forumID=735
    Carolyn

  • Problem with javascript in narrative view

    Hi gurús!
    I'm trying to put some conditional logic in a narrative view of my analysis. I found some tips, and wrote that:
    <script>
    if('@{FIN01TIME}{ }'=='Period')
    document.write("[b]Fiscal Year : [/b]@1       [b]Fiscal Quarter : [/b]@2       [b]Fiscal Period : [/b]@3       [b]Roll Up : [/b]@{FIN01ND}{ }      [b]Cost Center : [/b]@{FIN01CC}{ }       [b]Currency : [/b]@{FIN01CURR}{ }")
    if('@{FIN01TIME}{ }'=='Quarter')
    document.write("[b]Fiscal Year : [/b]@1       [b]Fiscal Quarter : [/b]@2       [b]Roll Up : [/b]@{FIN01ND}{ }      [b]Cost Center : [/b]@{FIN01CC}{ }       [b]Currency : [/b]@{FIN01CURR}{ }")
    if('@{FIN01TIME}{ }'=='Year')
    document.write("[b]Fiscal Year : [/b]@1       [b]Roll Up : [/b]@{FIN01ND}{ }      [b]Cost Center : [/b]@{FIN01CC}{ }       [b]Currency : [/b]@{FIN01CURR}{ }")
    </script>
    All works good, but the problem happens when I "click" on paging buttons of my analysis (see attached image: javascript_problem_paging.png). After click, it leaves me to a blank page with only narrative view content. Also, displays "error on page" warning in status bar (see attached image: javascript_problem_afterclick.png)
    I believe that this issue happens with "onclick" event of javascript. I tried to disable it, but still not works.
    Any help will be appreciated.
    Thanks for your time!
    Regards,
    Fabian

    Hi all!
    I get my own answer, jeje.
    Instead of use "document.write..." I put another narrative view with a <div> control and set it's content by "document.getElementById(..).innerHTML = "(same HTML code)""
    It works perfect! I hope that this achievement helps somebody else.
    Regards,
    Fabian

  • ADF - MyFaces, HttpUnit testing problem with Javascript.

    Dear all
    Does anybody know how to test ADF Faces. Any tool would be of interest to me although Opensource and Free Software is prefered?
    My task is to write a set of unit tests to test an Oracle ADF and Apache MyFaces application. I have attempted to use both Cactus and HttpUnit. However I am struggling with a simple test case which should simulate a login.
    The problem I have is that ADF Faces produces the following dynamic javascript file (I am guessing it is dynamic because I can not find this in either adf-faces-impl-10_1_3_0_4.jar or adf-faces-api-10_1_3_0_4.jar which are the two jars am implementing in my project.):
    Common10_1_3_0_4.js
    Which when parsed by js.jar (Rhino javascript engine) I get the following error:
    com.meterware.httpunit.ScriptException: Event 'submitForm('maincontent:loginForm',1, {source:'maincontent:submit'});return false;' failed: org.mozilla.javascript.EcmaError: TypeError: Cannot call method "split" of undefined at
    com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.handleScriptException (JavaScript.java:202)
    (This file Common10_1_3_0_4.js is over 5000 lines long and so I do not want to post it as this posting is already quite long).
    Downloading the file directly after it has been built and modifying it and fixing the error by ensuring the split function is called on a strongly typed String variable, then commenting out from the web.xml below I tried the HttpUnit test again.
         <servlet>
              <servlet-name>resources</servlet-name>
              <servlet-class>oracle.adf.view.faces.webapp.ResourceServlet</servlet-class>
         </servlet>
         <!-- servlet-mapping>
              <servlet-name>resources</servlet-name>
              <url-pattern>/adf/*</url-pattern>
         </servlet-mapping -->
    This time I get no error, but the original login page simply gets served again.
    login.jsp (which is called as login.jsf)
    <%@ page contentType="text/html; charset=UTF-8" %>
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces/html" prefix="afh"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af"%>
    <!-- Content -->
    <af:objectSeparator />
    <af:panelBox text="#{msg['login.info.loginHeader']}" width="100%" background="transparent">
         <af:form id="loginForm">
                   <af:objectSpacer height="10px" />
                   <af:panelGroup layout="vertical">
                        <af:panelForm labelWidth="5%">
                             <!--User Name-->
                             <af:panelLabelAndMessage for="username">
                                  <af:inputText label="User Name:"
                                       id="username"
                             columns="25"
                             required="yes"
                             secret="false"
                             value="#{userBean.userName}"
                             shortDesc="#{msg['global.user.userName']}" />
                             </af:panelLabelAndMessage>
                             <af:panelLabelAndMessage for="password">
                                  <af:inputText label="Password:"
                                       id="password"
                             columns="25"
                             required="yes"
                             secret="true"
                             value="#{userBean.password}"
                             shortDesc="#{msg['global.user.password']}" />
                             </af:panelLabelAndMessage>
                   <af:objectSpacer height="10px" />
                        <!--Login Button-->
                        <af:commandButton id="submit"
                                  textAndAccessKey="#{msg['global.button.login']}"
                                  action="#{userBean.login}" />
                        </af:panelForm>
                   </af:panelGroup>
         </af:form>
    </af:panelBox>
    TestCase LoginTest.java:
    package com.siemens.pse.wmstesting;
    import java.io.IOException;
    import junit.framework.TestCase;
    import junit.framework.TestSuite;
    import com.meterware.httpunit.GetMethodWebRequest;
    import com.meterware.httpunit.WebConversation;
    import com.meterware.httpunit.WebForm;
    import com.meterware.httpunit.WebLink;
    import com.meterware.httpunit.WebRequest;
    import com.meterware.httpunit.WebResponse;
    public class LoginTest extends TestCase {
         * The URL of the Login page for all login tests
         public static final String URL = new String( "http://localhost/WMS/pages/login.jsf" );
    public static void main( String args[] ) {
    junit.textui.TestRunner.run( suite() );
    public static TestSuite suite() {
    return new TestSuite( LoginTest.class );
    public LoginTest( String s ) {
    super( s );
    public void testGetLogin() throws Exception {
         response = new WebConversation( ).getResponse( request );
    // Test the result
    assertContains( response, "Login Management" );
    public void testLoginSuccess() throws Exception {
         response = new WebConversation( ).getResponse( request );
    WebForm form = response.getFormWithID( "maincontent:loginForm" );
    assertNotNull( "No form found with ID 'maincontent:loginForm'", form );
    form.setParameter( "maincontent:username", "admin" );
    form.setParameter( "maincontent:password", "pass" );
    WebLink submit = response.getLinkWithID("maincontent:submit");
    response = submit.click();
    System.out.println( response.getText());
    // Test the result
    assertContains( response, "Welcome to the Temperature Measurement System" );
    * Convenience function that asserts that a substring can be found in
    * the returned HTTP response body.
    * @param theResponse the response from the server side.
    * @param s the substring to look for
    public void assertContains( WebResponse response, String s ) {
         String target = new String("");
         try {
                   target = response.getText(); }
         catch (IOException e) {
              e.printStackTrace(); }
         if ( target.indexOf( s ) < 0 ) {
              // Error showing which string was NOT found
              fail( "Response did not contain the substring: [" + s + "]" );
    private WebRequest request = new GetMethodWebRequest( LoginTest.URL );
    private WebResponse response;
    }

    Dear All
    Well I found the solution to my testing requirements. HtmlUnit is able to deal with the dynamic Javascript that is generated by the ADF Faces application. The strange part is that HtmlUnit uses the Rhino Javascript engine just as HttpUnit and Cactus, however these two could not deal with the javascript whereas HtmlUnit could.
    I include a snippet of a test case that I wrote that now works.
    public void testLoginSuccess() throws Exception {
    final WebClient webClient = new WebClient( BrowserVersion.INTERNET_EXPLORER_6_0 );
    final URL url = new URL("http://localhost/WMS/pages/login.jsf");
    final HtmlPage page = (HtmlPage)webClient.getPage(url);
    // Get the form that we are dealing with and within that form,
    // find the submit button and the field that we want to change.
    final HtmlForm form = page.getFormByName("maincontent:loginForm");
    final HtmlTextInput usernameField = (HtmlTextInput) form.getInputByName("maincontent:username");
    final HtmlPasswordInput passwordField = (HtmlPasswordInput) form.getInputByName("maincontent assword");
    final ClickableElement button = (ClickableElement) form.getHtmlElementById("maincontent:submit");
    // Change the value of the text field
    usernameField.setValueAttribute("admin");
    passwordField.setValueAttribute("pass");
    // Get the submitted form
    final HtmlPage welcomePage = (HtmlPage) button.click();
    assertEquals( "Temperature Measurement System", welcomePage.getTitleText() );
    }

  • Dreamweaver CS5.5 file upload problems with javascript

    Hi,
    Maybe someone can help me. I have both CS4 and CS5.5 and Lion installed.
    When I upload files to the remote server, formatting for all source code (including javascript) is lost. And then any javascript functions on the website do not work. I have the same problem when uploading files with Filezilla.
    Another problem - probably related - is that under Firefox javascript of my local website does not work (it works on a fresh start, but only for the first link), while the remote site under Firefox works fine. Safari works both remotely and local.
    Now, when I boot the Mac from the Snow Leopard partition, everything works just fine. So it must have to do with Lion.
    Does anyone know how to fix this, please?

    Hi, thank you for helping.
    Line Break is set to CR (Macintosh). I don't know what OS our host server is running. I would assume it is either  Linux or Windows.
    On the other user account Line Break was set to LF (Unix), so I switched it on my account as well.
    After that the file transferred with the code intact. Just out of curiosity I switched the setting back, and it still works, but only for new files. Also, old files can no longer be deleted.
    Firefox hasn't changed. Under the other user the local site works, under my user, the scripts still don't work.
    So, I am very confused. I will give Apple a call to see, how I can reset the user preferences and report back.

  • Problems with JAVASCRIPT after upgrade to 10.4.3

    Hi There,
    I have upgraded to 10.4.3 and I have problems using my GMAIL account (cant send emails) the message reads like this (see below).
    Javascript problems Oops...the system was unable to perform your operation.
    Please try again in a few seconds.
    Can anybody help? Will it be a case of going back to 10.4 (dont really want to this as I will have to reinstall the OS and thats a pain)

    First these are the only CAT OS devices supported:
    http://www.cisco.com/en/US/docs/net_mgmt/ciscoworks_lan_management_solution/4.0.1/device_support/table/lms401sdt.html#Catalyst%20OS%20Devices
    1. What kind of devices are we talking about here?
    2. Enable the debugs from Admin --> System --> Debug Settings --> Config and Image Management Debugging settings.  Select ICServer and enable the debugs the modules listed.
    3. Duplicate the problem.
    4. Post the show ver along with the LMS logs from CSCOpx/log directory  called dcmaclinet.log, dcmaservices.log, and ICServer.log. Give me a  sample IP or hostname to work with to troubleshoot.
    5. Get the jobs logs from CSCOpx/files/rme/jobs/ICServer/ . The job ID is from step 3 when you recreated the job to duplicate the problem.

Maybe you are looking for

  • How was my prod8uct registered ?  trial vs purchase

    how do I verify my product (elements 13) is registered as a product vs trial copy ?

  • HT204204 iPad no vga

    SSince up dating iOS no VGA from the dock connector. I went to the Apple Store and they confirmed it is a bug in the new iOS. I will have to wait until apple does a fix dixk

  • Merging DVD SP projects

    Is there a way to import the subtitle track from one DVD SP project to another? or some way to merge projects? thx

  • Which Controller and HardDisk

    Hi Guys I am planning to buy a external drive for my Ibook 1.42 ghz . I have a focusrite saffire . so i am primarily lookign for a Firewire drive so that i can daisy chain it with saffire . I have been usign lacie. is there and other brand you guys w

  • There are times that I don't get voice instructions in Maps on my iPhone

    There are times that I don't get voice instructions in Maps on my iPhone 5s. Actually, the directions don't even advance automatically as I expect. Can anyone explain why this happens? How do I correct this? It's dangerous to drive and look at the iP