Problem with JavaScript in my PDF Form buttons

I am trying to have my user click on a button in my form on my website and e-mail the form data to me.
I am using the following JavaScript with my form button:
this.mailForm(false, "[email protected]", "", "", "Subject", "Message Body");
Protected mode is off.
When I use the above statement (whether the 1st parameter is set to true or false), nothing happens – no email gets sent and no mail dialog box appears. If I change from this.mailForm(...) to this.mailDoc(...), I get a mail dialog box but, as expected, it sends the blank form without the filled-in data due to low user privileges.
How can I send the form data with this.mailForm(...)? (Note that I prefer to use this.mailForm(...) rather than mailto:(...) because this.mailForm(...) supposedly allows me to e-mail the form without user interaction.)
-- Don

Thanks for responding.  I have been using “Submit a form” in the Mouse up event.  I had that operation do a mailto: and it worked, but required user interaction on the part of the web page visitor.  I have successfully created an equivalent JavaScript including:
    var url = "mailto:[email protected]?subject=mySubject&body=MyMessage"; 
    this.submitForm(url, true);
The above sent the FDF file successfully, but again, it required user interaction.
Then I tried this JavaScript - as I mentioned in a previous post - after you said to use doc.submitForm():
    var url = "http://mydomain.com/submit_notice.php";
    doc.submitForm(url, false);
The above script seemed to do nothing (with no error message). Shouldn't it bring up the PHP file in the web browser?
I have that php file, submit_notice.php, created, but I have not written any PHP scripts to e-mail the FDF file.  I have never written a PHP script to take the posted FDF data and email it, but I have used the PHP mail() function and posted variables.
As for what I want to happen on the client side after the submit takes place: I simply want the FDF file to go to an e-mail that I specify.  Additionally, I need it to happen without any client interaction on the part of the web page visitor.  I can expect that visitor to have Adobe reader, but no add-ons or protected mode requirement.
Please give me an example that emails the FDF file without any user interaction.
Thank you.
-- Don

Similar Messages

  • Problems with XML import to PDF form esp. checkboxes

    I am posting this here because it was suggested to me to do so when I posted it here:
    http://forums.adobe.com/message/5613723
    Hi,
    I work with a certain PDF form created by the US government. They recently "upgraded" the form. (N600K)
    With the old form, I would import values in an XML file, which worked fine.
    With the new form, I have encountered a problem:
    The checkboxes behave as if they are ALL one group of radio buttons, which means only one can be selected at a time.
    There are quite a few questions with checkbox answers. If I or my xml file select any one if them, the rest get cleared.
    I have contacted the US government about this, but surprisingly, they have not responded.
    If you are familiar with designing PDF forms and think you might be able to understand my problem and help fix it, i would love to hear from you!
    Please email me at gidon.ariel @ gmail.com

    Tundra Steve, it sounds like that, that all the checkboxes behave like one
    set of radio buttons. But they aren't. They are separate sets of
    checkboxes, and while some sets could behave like radio buttons
    (male/female, for example), they should really all behave like the
    checkboxes that they are, and allow any and all to be selected.
    Thanks and God Bless,
    Gidon Ariel  [email protected]
    cell 054-5665037, home 02-5354586, VoIP 845-445-1604
    Israel fax 1532-5354586,  USA fax 623-433-4874
    Maale Hever, DN Har Hebron 90420 Israel
    http://www.facebook.com/gidonariel http://bit.ly/gidon-linkedin
    "Happy are those who have discovered
    that the secret of life is to be nice to others"

  • Problem with people opening my PDF Form

    Hi,
    I have people who can't open my Form PDF file - they get an error message. Some of them have version 5, 6 or 7 of Acrobat.
    Any suggestions? I have enabled Usage Rights in Acrobat and Saved.

    Hi,
    you can inform your clients with a message when opening your form with an (too) old pdf reader version, to avoid problems with using the form.
    put following script into the initialize event of the first page of your form!
    if (typeof(app.viewerVersion) != "undefined")
    if (app.viewerVersion < 8.0)
    app.alert({cMsg:"ATTENTION:\rThis file requires Adobe Reader 8.0 or newer!",cTitle: "ATTENTION:", nIcon: 1, nType: 0} )

  • Problem with the Travel Expenses PDF Form

    Hi Experts,
    We are facing a strange issue in our production system that the Travel Expenses PDF form is coming as a blank pop up when users raise a Travel Expenses request or try to see the form in 'My trips and Expenses'.
    The strange thing is that it is happning for only 3 users in Production system only.We have confirmed that it is not a Desktop issue. We did not come across this earlier while 3500 users are using it for 9 months now.
    The same problem is not repeated in Dev, Qua or even in Production for any other user.
    The SAP Security team has also confirmed that all relevent authorisations have been given to effected users like other users for whom the same is working
    Kindly help me with the same if you have encountered the same problem or can suggest something that may rectify the problem.
    Help will be appreciated << Please do not offer points >>
    Regards,
    -Amol Gupta
    Edited by: Rob Burbank on Sep 21, 2010 2:38 PM

    Hi Siddharth,
    Thanks for the reply.
    We have checked that it is not a Desktop issue.
    Also SAP Security team says that the effected users have been given the regular authorisations as given to other users using the same functionality.
    As i mentioned it is not a problem with ADS as the same functionality is working fine for 3500 users for 9 months.
    Regards,
    -Amol Gupta

  • 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 Consolas font in a form

    I have problem with Consolas font in a form in latest Adobe Reader (v11.0.9)
    It shows dots (password sign) instead of letters. Edit box is not configured for passwords.
    Form was created by Foxit PhantomPDF and it shows correctly in Foxit.
    Can somebody check PDF for errors or warnings?
    http://www60.zippyshare.com/v/71759184/file.html

    You should embed these fonts in the document.
    If you need more help with this, please ask in the Acrobat forum.

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

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

  • Facing problem with logo in the PDF attachment when sending mail...

    hi friends,
    i'm facing problem with logo in the PDF attachment to the mail.
    my requirement:
    1. enter spool number and mail id in the selection screen.
    process:
    1. now the program will fetch the spool data and converts it to PDF.
    2. but when i'm trying to send mail with this PDF as attachment.
    when i open the PDF file from the mail, logo is not coming properly (looks disturbed).
    can anyone help me how to resolve this issue...
    thanks in advance, murashali.

    hi dinakar, thanks for your mail...
    logo looks good in spool/script/smartform.
    even it look good when i download this spool to pdf and to the presentation server as pdf file.
    i'm using CONVERT_OTFSPOOLJOB_2_PDF.
    when i used CONVERT_ABAPSPOOLJOB_2_PDF, is gives a msg - 'spool number not found'.
    here i'm using folloing code to pass pdf to the function module: SO_NEW_DOCUMENT_ATT_SEND_API1.
    code:
    Transfer the 132-long strings to 255-long strings
      lt_mtab_pdf[] = pdf[].
      LOOP AT lt_mtab_pdf INTO lwa_mtab_pdf.
        TRANSLATE lwa_mtab_pdf USING ' ~'.
        CONCATENATE lv_gd_buffer lwa_mtab_pdf INTO lv_gd_buffer.
        CLEAR lwa_mtab_pdf.
      ENDLOOP.
      TRANSLATE lv_gd_buffer USING '~ '.
      DO.
        lwa_mess_att = lv_gd_buffer.
        APPEND lwa_mess_att TO lt_mess_att.
        CLEAR lwa_mess_att.
        SHIFT lv_gd_buffer LEFT BY 255 PLACES.
        IF lv_gd_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    NOTE: problem i believe is with ''.  i'm getting this tilt symbol () in my pdf internal table.  here in the above code the line   TRANSLATE lv_gd_buffer USING '~ ' is changing the existing tilt to space.  so my logo is getting disturbed.
    even i tried with REPLACE this tilt with other char, but it doent work.
    can you give any idea...

  • Problem with opening some of PDFs in Photoshop CS6.

    Hi, I have a problem with opening some of PDFs in Photoshop CS6. It is said: it isn't possible to carry out an order since the module of the file format cannot analyse this file

    Don’t know if Reader has this, too, but in Acrobat one can check under Document Properties.
    I can convert and place the file in Photoshop CS6.
    I would recommend trying the usual trouble-shooting routines and if nothing helps un-installing, running the Cleaner and re-installing Photoshop.  (After making sure all customized presets like Actions, Patterns, Brushes etc. have been saved to s secure location.)
    http://blogs.adobe.com/crawlspace/2012/07/photoshop-basic-troubleshooting-steps-to-fix-mos t-issues.html
    Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6

  • Hello. Having a problem with skype. i am online, all buttons work, however i can not make a video call the button simply doesnt work. Messages works. voice calls works. Please help.

    Hello. Having a problem with skype. i am online, all buttons work, however i can not make a video call the button simply doesnt work. Messages works. voice calls works. Please help.

    Sounds like you need to contact skype.

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

  • Reader X - Getting Security Alert with a data filled PDF form

    My site uses PDF forms that have their data filled in dynamically by the classic asp code on the site. Before Reader X version, they were filled and displayed without a problem. With Reader X they display the security warning: "Data from this site is blocked to avoid potential security risks....." and the Options button to trust the site. I get this even thoguh it's the same site they are on already and I'm using an SSL cert for all files and I'm also using a direct link to generate the PDF.
    I know the user can just click the options and make the problem go away but many users seem unable to read and or panic when they see the alert.
    Is there a security setting or trust setting I can add or set in my form so that I will not get this security alert??

    No, apart from creating a certified document, but the user would still have to add you as a trusted source. If a document could override this, it would be rather pointless to have it in the first place.

  • 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

Maybe you are looking for