JS - Close Form Action Button

Hello!
I'm not sure if this would be the best forum for this, but here is my question:
I'm trying to make 2 forms that link together, and so far I have been successful in attaching one PDF in another, so that it opens the attachment when you click a button.  My boss requested that there be some sort of way to go back to the original form, since it may be confusing for some people once the attachment is opened, because it appears over the original document and covers it.
I apologize if this is convoluted, but the only solution I could think of was to have the attachment appear in a new window, with a JS button with an action that will "close" the attachment.  But I am not sure if this is even possible.
I know this is redundant (why couldn't they just hit the red x in the corner??) but when dealing with non-technology people, sometimes you have to make it as blatantly obvious as humanly possible.
Would anyone know a way to make a button that does this?  Or have another solution that might work better?
Thank you so much in advance!  I apologize if my request requires further clarification.
Best Regards,
Ashley
(Running Adobe Acrobat Pro XI)

One of the options in a button's action is to execute a menu item... Use it
and select File - Close.
You can also use a script, if you want. The code below will close a file
without prompting the user to save it, even if it was edited.
this.closeDoc(true);

Similar Messages

  • Converting PowerPoint with Action Buttons To PDF Form Question

    I am currently using Acrobat Pro 9.5.0 on Win 7 and Win XP sp3
    I have created Power Point Slide with one Action Button.  When I set the Action Button to Hyperlink to a video file, and use Acrobat > Form > Start from Wizard ..", the PDF file created by Acrobat has my Action Button as a field.   This field allows the click of this field to execute a certain action.   This is what I want.
    When I set the Action Buttion to hyperlink to an internal slide on my Power Point presentation (which has video inserted on that slide), and when I use Acrobat > Form > Start from Wizard ..", the PDF file created by Acrobat doesn't have my Action Button as a field.    It appears just as a regular pdf with no fields.
    Is there a way to get the wizard to convert my Action Button when I hyperlink to a slide to show up as a field (as in hyperlinking to an external file) ???
    I am using PPT 2007 (which doesn't allow true embedding of video within the PPT slide.   On PPT 2010 has this embedding feature.
    I would appreciate any help you can offer.
    Thank You,
    G

    I am currently using Acrobat Pro 9.5.0 on Win 7 and Win XP sp3
    I have created Power Point Slide with one Action Button.  When I set the Action Button to Hyperlink to a video file, and use Acrobat > Form > Start from Wizard ..", the PDF file created by Acrobat has my Action Button as a field.   This field allows the click of this field to execute a certain action.   This is what I want.
    When I set the Action Buttion to hyperlink to an internal slide on my Power Point presentation (which has video inserted on that slide), and when I use Acrobat > Form > Start from Wizard ..", the PDF file created by Acrobat doesn't have my Action Button as a field.    It appears just as a regular pdf with no fields.
    Is there a way to get the wizard to convert my Action Button when I hyperlink to a slide to show up as a field (as in hyperlinking to an external file) ???
    I am using PPT 2007 (which doesn't allow true embedding of video within the PPT slide.   On PPT 2010 has this embedding feature.
    I would appreciate any help you can offer.
    Thank You,
    G

  • How can do i set button to close form

    have put together an internal enquiry report form. to be filled in over a 2 week period and saved each time closed then submitted at the end of the fortnight. How can I set a button to save an close form. I don't need or want to close acrobat program
    thanks
    craig

    Hi Pascal,
    Add this script to the click event of your button. It will close the window containing the form.
    app.execMenuItem("Close");
    Denver
    Adobe Enterprise Support.

  • Can I add Action button on each page of my pdf document

    I have created  many power point slides with an action button on each slide that allows the user to click to display a video clip.   I would like to create a pdf document of this and replace each of my action button in ppt with an action button that works in Acrobat.
    I noticed that action buttons can be added to forms, but I want to be able to add an Action Button on each of my ppt slides to start playing a video clip (each slide will have a different video).
    I would like to do this using any coding method (i.e. Javascript, VBA, C , etc).   I think acrobat uses Javascript.
    The reason, is that I want to display my power point slides on an IPad and they don't support hyperlink in power point.   I believe IPad does suppport the full acrobat capabilities.
    Can this be done ??  
    Any suggestions where to start ??
    Thank You,
    G

    NO problem creating the buttons and then playing this back in Acrobat. Works great.
    However, unfortunately, none of the PDF viewers for the iPad support playing movies.   So playing it there won't work :(.
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Sat, 28 Jan 2012 11:00:47 -0800
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: Can I add Action button on each page of my pdf document
    Can I add Action button on each page of my pdf document
    created by gw70115<http://forums.adobe.com/people/gw70115> in Acrobat SDK - View the full discussion<http://forums.adobe.com/message/4171109#4171109

  • HTML Form Submit Button to call a procedure

    hi! been looking high and low across all forums and it seems there are specific users like myself having problems with submit button and pl/sql procedures. Hope someone can clarify on this.
    Scenario: created a html/dynamic page with a submit button(no java scripts, just plain <form action="schema.procedure" method="post"> etc) to pass values into a procedure to update database. In my case, i've hard coded the values in the procedure for testing purpose(thus my procedure don't receive any in parameters).
    Problem:
    Clicking on Submit button will result a page not found error.
    Solution read so far:
    Ensure that at least the Public has been granted Execute Access on that procedure, which i find funny cos I am logged in as the adminstrator having all the rights, heck, i even created the schemas, procedures and tables.
    Result for me:
    Page not found displayed, but when I highlight the url on that page (which is the complete address)and press Enter, the procedure went through and display the message in my procedure?!
    But if I clik on a link (pointing to the same procedure), the procedure went through immediately.
    I have tried:
    a) clearing the browser cache
    b) deleting archive versions of the page
    c) entering the whole address
    d) recreate the html page using pl/sql
    but still the same problem.
    Any advise on this? Is this a bug? how to go around this?
    Rgds.

    Hi,
    I did the following :
    1) created a procedure called test1 in schema portal30
    create or replace procedure test1
    as
    begin
    htp.p('Hi there');
    end;
    2) granted it to public
    grant execute on test1 to public;
    3)created a dynamic page like this:
    <HTML>
    <HEAD>
    <TITLE>Example</TITLE>
    </HEAD>
    <BODY>
    <form action='portal30.test1'>
    <input type="Submit" value="click me">
    </Form>
    <H1>Example of A Dynamic Page</H1>
    <ORACLE>select * from PORTAL30_DEMO.emp where deptno = :department</ORACLE>
    </BODY>
    </HTML>
    4) ran the dynamic page ,works fine
    Thanks,
    Anu

  • Problems with file uploading servlet, the form action doesnt capture url

    Hi, i have one problem. I am working on a project , i have created a servlet that takes uploaded files and processses them and links them back to user to download. The servlet works perfectly from my computer, I am using apache-tomcat-6.0.16 and java 1.6 , I have two forms called encrypt.html and decrypt.html, I will post both of them, now the problem is when somebody access it on the internet while i am running apache, they get a connection was reset on a firefox browser and same stuff on Internet Explorer.
    i have checked my server logs and saw nothing unusual there, So please if you can help me, it is my project.
    I am pasting html file and error message that other users where getting remotely.
    <html>
    <head>
    <meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
    <title>Stego Form</title>
    <link rel='STYLESHEET' type='text/css' href='encrypt.css'>
    </head>
    <body>
    <center>
    <form name='encrypt' enctype='multipart/form-data' method='POST' action='http://localhost:8080/examples/temp2
    ' accept-charset='UTF-8'>
    <input type='hidden' name='sfm_form_submitted' value='yes'>
    </input>
    <input type='hidden' name='eord' value='e'>
    <select name='encryption' size='1'>
             <option value='Select an encryption' selected>
             Select an encryption
             </option>
             <option value='DES'>
             DES
             </option>
             <option value='Tripple DES'>
             Tripple DES
             </option>
    </select>
             <input type='file' name='overt' size='20'>
             <input type='file' name='covert' size='20'>
             <input type='submit' name='submit' value='Submit'>
    </form>
    </center>
    </body>
    </html>so it works for me even if i access the page with my ip , but for others it doesnt work,
    now the user got this xhtml page that i will show, i cant find attach button so i am pasting here.
    here is the servlet coding
    import java.io.*;
    import java.util.*;
    import javax.servlet.ServletException;
    import javax.servlet.http.*;
    import org.apache.commons.fileupload.*;
    import org.apache.commons.fileupload.disk.DiskFileItemFactory;
    import org.apache.commons.fileupload.servlet.ServletFileUpload;
    public class temp2 extends HttpServlet
        FileInputStream fin;
        String filenames[] = new String[2],fieldname,fieldval;
        String keyfile,IVfile;
        String names[] = new String[2];
        public temp2()
            super();
        @Override
        public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
            doPost(request, response);
        @Override
        public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
            String eord="";
            List lst = null;
            boolean isMultiPart = ServletFileUpload.isMultipartContent(request);
            if (!isMultiPart) // check whether the post request is actually multipart
                System.out.println("ERROR NOT MULTIPART");
                System.exit(0);
            DiskFileItemFactory fif = new DiskFileItemFactory();
            ServletFileUpload sfu = new ServletFileUpload(fif);
            sfu.setSizeMax(10000000);
            try {  lst = sfu.parseRequest(request);  }
            catch (FileUploadException ex)
            { System.out.println("ERROR IN PARSING FILES" + ex); System.exit(0);  }
            if(lst.isEmpty())  // check whether request is empty
                System.out.println("ERROR LIST SIZE NOT GOOD : " + lst.size());
                System.exit(0);
            Iterator x = lst.iterator();
            int i = 0;
            FileItem f = (FileItem)x.next();
            f = (FileItem)x.next();
            System.out.println(f.getFieldName());
            if(f.getFieldName().equalsIgnoreCase("eord")) // check hidden field to know the case : encrypt or decrypt
                eord = f.getString();
                System.out.println(f.getString());
            else // if it is not first field exit
                System.out.println("Invalid FORM");
                System.exit(0);
            f = (FileItem)x.next(); // next field
            if(f.getFieldName().equalsIgnoreCase("encryption")) // type of encryption des / tdes
                fieldname = f.getFieldName();
                fieldval = f.getString();
                System.out.println(f.getString());
            if(eord.equalsIgnoreCase("e")) // if it is encryption form only file required
                while(x.hasNext())
                    f = (FileItem)x.next();
                    if(!f.isFormField())
                        int check = f.getName().lastIndexOf(File.separator);
                        System.out.println(File.separator);
                        if(check==-1)
                            System.out.println(f.getName());
                            System.out.println("Unsupported browser : " + check);
                            System.exit(0);
                        File ff = new File("e:\\apache\\webapps\\temp\\"+f.getName().substring(check));
                        names[i] = ff.getName(); // original file names
                        try
                            f.write(ff);
                            filenames[i] = ff.getAbsolutePath();
                        // renamed    
                            ff.deleteOnExit();
                        }catch(Exception e) {System.out.println("Error writing file"+ ff.getAbsolutePath()); System.exit(0);}
                        i++;
                    try { System.in.read(); } catch(Exception e) {}
                }// endwhile
                if(fieldval.equalsIgnoreCase("DES"))
                    System.out.println("DES 1"+filenames[1]);
                    javades o = new javades(filenames[1]); // the file to be encrypted   
                    filenames[1] = "e:\\apache\\webapps\\temp\\files\\" + names[1];
                    System.out.println("should be original" + filenames[1]);
                else if(fieldval.equalsIgnoreCase("Tripple DES"))
                    javatdes o = new javatdes(filenames[1]);
                    filenames[1] = "e:\\apache\\webapps\\temp\\files\\" + names[1];
                    System.out.println(filenames[1]);
                System.out.println("Calling stego");
                filenames[0] = "e:\\apache\\webapps\\temp\\" + names[0];
                System.out.println("file 1 "+ filenames[0]);
                System.out.println("file 2"+ filenames[1]);
                try { System.in.read(); } catch(Exception e) {}
                stego s = new stego(filenames[0],filenames[1]);
                System.out.println("mainext " + s.mainext);
                // encryption done, and new files are loaded, now lets hide
                if(s.mainext.equalsIgnoreCase("wav"))
                    s.encodewav();
                    System.out.println("Encoded wave");
                else if(s.mainext.equalsIgnoreCase("bmp"))
                    System.out.println("Encoded bmp");
                    s.encodebmp();
                System.out.println("done !");
                PrintWriter pr = response.getWriter();
                pr.println("Greetings , Your work is done and saved, now download the following files");
                pr.println("The secret key file is needed for getting back your hidden file, so download that too");
                pr.write("<a href=\"/temp/files/IV.txt\">click here</a>");
                pr.write("<br/><a href=\"/temp/files/key.txt\">click here</a>");
                pr.write("<br/><a href=\"/temp/files/"+names[0]+"\">click here</a>");
                return;
            // if it is decryption case
            else if(eord.equalsIgnoreCase("d"))
                while(x.hasNext())
                    f = (FileItem)x.next();
                    if(!f.isFormField())
                        int check = f.getName().lastIndexOf(File.separator);
                        System.out.println(File.separator);
                        if(check==-1)
                            System.out.println(f.getName());
                            System.out.println("Unsupported browser : " + check);
                            System.exit(0);
                        File ff = new File("e:\\apache\\webapps\\temp\\"+f.getName().substring(check));
    // else if ladder to store paths of stegofile keyfile and IVfile                   
                        if(f.getFieldName().equalsIgnoreCase("stegofile"))
                            filenames[0] = ff.getAbsolutePath();
                        else if(f.getFieldName().equalsIgnoreCase("keyfile"))
                            keyfile = ff.getAbsolutePath();
                        else if(f.getFieldName().equalsIgnoreCase("IVfile"))
                            IVfile = ff.getAbsolutePath();
                        try
                            f.write(ff); // writes whole file at once
                        }catch(Exception e) {System.out.println("Error writing file"); System.exit(0);}
                }// endwhile
                System.out.println("Calling stego");
                System.out.println("file 1 "+ filenames[0]);
                stego s = new stego(filenames[0]);
                System.out.println("mainext " + s.mainext);
                if(s.mainext.equalsIgnoreCase("wav"))
                    s.decodewav();
                    System.out.println("Encoded wave");
                else if(s.mainext.equalsIgnoreCase("bmp"))
                    s.decodebmp();
                    System.out.println("Encoded bmp");
                System.out.println("done !");
                ////// hidden file has been retrieved , now lets decrypt it
                System.out.println("ext " + s.ext);
                filenames[0] = "e:\\apache\\webapps\\temp\\"+s.filename;
                System.out.println(filenames[0]);
                System.out.println(keyfile);
                System.out.println(IVfile);
                if(fieldval.equalsIgnoreCase("DES"))
                    javades o = new javades(filenames[0],keyfile,IVfile); // the file to be encrypted   
                    filenames[0] = "e:\\apache\\webapps\\temp\\" + ( new File(filenames[0]).getName());
                    System.out.println("should be original" + filenames[0]);
                else if(fieldval.equalsIgnoreCase("Tripple DES"))
                    javatdes o = new javatdes(filenames[0],keyfile,IVfile);
                    filenames[0] = "e:\\apache\\webapps\\temp\\" + ( new File(filenames[0]).getName());
                    System.out.println(filenames[0]);
                PrintWriter pr = response.getWriter();
                pr.write("Greetings, you have successfully retrieved your hidden file, now download it from here <br>");
                pr.write("<a href=\"http://localhost:8080/temp/files/" + (new File(filenames[0]).getName())+"\">Click here</a>");
    }and here is the xhtml file the user receives, whe he clicks the submit button,
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html [
      <!ENTITY % htmlDTD
        PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "DTD/xhtml1-strict.dtd">
      %htmlDTD;
      <!ENTITY % netErrorDTD
        SYSTEM "chrome://global/locale/netError.dtd">
      %netErrorDTD;
    <!ENTITY loadError.label "Problem loading page">
    <!ENTITY retry.label "Try Again">
    <!-- Specific error messages -->
    <!ENTITY connectionFailure.title "Unable to connect">
    <!ENTITY connectionFailure.longDesc "&sharedLongDesc;">
    <!ENTITY deniedPortAccess.title "This address is restricted">
    <!ENTITY deniedPortAccess.longDesc "">
    <!ENTITY dnsNotFound.title "Server not found">
    <!ENTITY dnsNotFound.longDesc "
    <ul>
      <li>Check the address for typing errors such as
        <strong>ww</strong>.example.com instead of
        <strong>www</strong>.example.com</li>
      <li>If you are unable to load any pages, check your computer's network
        connection.</li>
      <li>If your computer or network is protected by a firewall or proxy, make sure
        that &brandShortName; is permitted to access the Web.</li>
    </ul>
    ">
    <!ENTITY fileNotFound.title "File not found">
    <!ENTITY fileNotFound.longDesc "
    <ul>
      <li>Check the file name for capitalization or other typing errors.</li>
      <li>Check to see if the file was moved, renamed or deleted.</li>
    </ul>
    ">
    <!ENTITY generic.title "Oops.">
    <!ENTITY generic.longDesc "
    <p>&brandShortName; can't load this page for some reason.</p>
    ">
    <!ENTITY malformedURI.title "The address isn't valid">
    <!ENTITY malformedURI.longDesc "
    <ul>
      <li>Web addresses are usually written like
        <strong>http://www.example.com/</strong></li>
      <li>Make sure that you're using forward slashes (i.e.
        <strong>/</strong>).</li>
    </ul>
    ">
    <!ENTITY netInterrupt.title "The connection was interrupted">
    <!ENTITY netInterrupt.longDesc "&sharedLongDesc;">
    <!ENTITY netOffline.title "Offline mode">
    <!ENTITY netOffline.longDesc "
    <ul>
      <li>Uncheck "Work Offline" in the File menu, then try again.</li>
    </ul>
    ">
    <!ENTITY netReset.title "The connection was reset">
    <!ENTITY netReset.longDesc "&sharedLongDesc;">
    <!ENTITY netTimeout.title "The connection has timed out">
    <!ENTITY netTimeout.longDesc "&sharedLongDesc;">
    <!ENTITY protocolNotFound.title "The address wasn't understood">
    <!ENTITY protocolNotFound.longDesc "
    <ul>
      <li>You might need to install other software to open this address.</li>
    </ul>
    ">
    <!ENTITY proxyConnectFailure.title "The proxy server is refusing connections">
    <!ENTITY proxyConnectFailure.longDesc "
    <ul>
      <li>Check the proxy settings to make sure that they are correct.</li>
      <li>Contact your network administrator to make sure the proxy server is
        working.</li>
    </ul>
    ">
    <!ENTITY proxyResolveFailure.title "Unable to find the proxy server">
    <!ENTITY proxyResolveFailure.longDesc "
    <ul>
      <li>Check the proxy settings to make sure that they are correct.</li>
      <li>Check to make sure your computer has a working network connection.</li>
      <li>If your computer or network is protected by a firewall or proxy, make sure
        that &brandShortName; is permitted to access the Web.</li>
    </ul>
    ">
    <!ENTITY redirectLoop.title "The page isn't redirecting properly">
    <!ENTITY redirectLoop.longDesc "
    <ul>
      <li>This problem can sometimes be caused by disabling or refusing to accept
        cookies.</li>
    </ul>
    ">
    <!ENTITY unknownSocketType.title "Unexpected response from server">
    <!ENTITY unknownSocketType.longDesc "
    <ul>
      <li>Check to make sure your system has the Personal Security Manager
        installed.</li>
      <li>This might be due to a non-standard configuration on the server.</li>
    </ul>
    ">
    <!ENTITY sharedLongDesc "
    <ul>
      <li>The site could be temporarily unavailable or too busy. Try again in a few
        moments.</li>
      <li>If you are unable to load any pages, check your computer's network
        connection.</li>
      <li>If your computer or network is protected by a firewall or proxy, make sure
        that &brandShortName; is permitted to access the Web.</li>
    </ul>
    ">
      <!ENTITY % globalDTD
        SYSTEM "chrome://global/locale/global.dtd">
      %globalDTD;
    ]>
    <!-- ***** BEGIN LICENSE BLOCK *****
       - Version: MPL 1.1/GPL 2.0/LGPL 2.1
       - The contents of this file are subject to the Mozilla Public License Version
       - 1.1 (the "License"); you may not use this file except in compliance with
       - the License. You may obtain a copy of the License at
       - http://www.mozilla.org/MPL/
       - Software distributed under the License is distributed on an "AS IS" basis,
       - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
       - for the specific language governing rights and limitations under the
       - License.
       - The Original Code is mozilla.org code.
       - The Initial Developer of the Original Code is
       - Netscape Communications Corporation.
       - Portions created by the Initial Developer are Copyright (C) 1998
       - the Initial Developer. All Rights Reserved.
       - Contributor(s):
       -   Adam Lock <[email protected]>
       -   William R. Price <[email protected]>
       -   Henrik Skupin <[email protected]>
       -   Jeff Walden <[email protected]>
       - Alternatively, the contents of this file may be used under the terms of
       - either the GNU General Public License Version 2 or later (the "GPL"), or
       - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
       - in which case the provisions of the GPL or the LGPL are applicable instead
       - of those above. If you wish to allow use of your version of this file only
       - under the terms of either the GPL or the LGPL, and not to allow others to
       - use your version of this file under the terms of the MPL, indicate your
       - decision by deleting the provisions above and replace them with the notice
       - and other provisions required by the LGPL or the GPL. If you do not delete
       - the provisions above, a recipient may use your version of this file under
       - the terms of any one of the MPL, the GPL or the LGPL.
       - ***** END LICENSE BLOCK ***** -->
    <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
        <title>Problem loading page</title>
        <link rel="stylesheet" href="temp2_files/netError.css" type="text/css" media="all"/>
        <!-- XXX this needs to be themeable -->
        <link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAANbY1E9YMgAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAICSURBVHjaYvz//z8DJQAggJhwiDPvnmlzc2aR0O+JGezt+AwACCCsBhxfYhn59N41FWtXIxZOLu70niRGXVwGAAQQNgNYHj96O8HaWYdJW5ubwd4/mI2Ng7sblwEAAYRhwMm1URk/vn4SUNWVYGD8+YZBXZOZm5OLzRjoCmNsBgAEEKoBN82Y7l851GLrqMjM8Oc7A8O/3wwMP54wuAQFCXNycUzGZgBAAKEYcOaKZO2/f//5FbUVgBrfMoRVcgHpNwyKGjKMXDwCan0prFboBgAEELIBzDcvXyy2cVZhYPj9GWj7H4jo/38MDJ9OMDj7O/KzsjH3oxsAEEBwA/bNNipiZf7FI6cqwcDw8x2qqp8fGORUpVn4BEXlgGHhhCwFEEAwA9gfP3hdZ+Oizcjw+wvCdjgAuuLrFQbXIH9hTm7uqcgyAAEENuD4ctcebm5mbikFYRTbV7V/Q6j88Z5BSuY7q4CQgAjQFR4wYYAAAhtw89L5ZFsnRaDtn4CW/YXrAQcisit+PGVwDgrnZ2NnnwATBQggpsNLvGYLCAmxi8tLARWg+h3FBVBXSEj/ZZWQkRcCuiIQJAQQQCyvnj5KMDTkZ2JgYmRg4FchnHv+vmEwttLmeXT3VjKQtx4ggFgk5TXebV63UfT3ijOMxOZAVlZWdiB1EMQGCCBGSrMzQIABAFR3kRM3KggZAAAAAElFTkSuQmCC"/>
        <script type="application/x-javascript"><![CDATA[
          // Error url MUST be formatted like this:
          //   moz-neterror:page?e=error&u=url&d=desc
          // Note that this file uses document.documentURI to get
          // the URL (with the format from above). This is because
          // document.location.href gets the current URI off the docshell,
          // which is the URL displayed in the location bar, i.e.
          // the URI that the user attempted to load.
          function getErrorCode()
            var url = document.documentURI;
            var error = url.search(/e\=/);
            var duffUrl = url.search(/\&u\=/);
            return decodeURIComponent(url.slice(error + 2, duffUrl));
          function getDescription()
            var url = document.documentURI;
            var desc = url.search(/d\=/);
            // desc == -1 if not found; if so, return an empty string
            // instead of what would turn out to be portions of the URI
            if (desc == -1) return "";
            return decodeURIComponent(url.slice(desc + 2));
          function retryThis()
            // Session history has the URL of the page that failed
            // to load, not the one of the error page. So, just call
            // reload(), which will also repost POST data correctly.
            try {
              location.reload();
            } catch (e) {
              // We probably tried to reload a URI that caused an exception to
              // occur;  e.g. a non-existent file.
          function initPage()
            var err = getErrorCode();
            // if it's an unknown error or there's no title or description
            // defined, get the generic message
            var errTitle = document.getElementById("et_" + err);
            var errDesc  = document.getElementById("ed_" + err);
            if (!errTitle || !errDesc)
              errTitle = document.getElementById("et_generic");
              errDesc  = document.getElementById("ed_generic");
            var title = document.getElementById("errorTitleText");
            if (title)
              title.parentNode.replaceChild(errTitle, title);
              // change id to the replaced child's id so styling works
              errTitle.id = "errorTitleText";
            var sd = document.getElementById("errorShortDescText");
            if (sd)
              sd.textContent = getDescription();
            var ld = document.getElementById("errorLongDesc");
            if (ld)
              ld.parentNode.replaceChild(errDesc, ld);
              // change id to the replaced child's id so styling works
              errDesc.id = "errorLongDesc";
            // remove undisplayed errors to avoid bug 39098
            var errContainer = document.getElementById("errorContainer");
            errContainer.parentNode.removeChild(errContainer);
        ]]></script>
      </head>
      <body dir="ltr">
        <!-- ERROR ITEM CONTAINER (removed during loading to avoid bug 39098) -->
        <!-- PAGE CONTAINER (for styling purposes only) -->
        <div id="errorPageContainer">
          <!-- Error Title -->
          <div id="errorTitle">
            <h1 id="errorTitleText">The connection was reset</h1>
          </div>
          <!-- LONG CONTENT (the section most likely to require scrolling) -->
          <div id="errorLongContent">
            <!-- Short Description -->
            <div id="errorShortDesc">
              <p id="errorShortDescText">The connection to the server was reset while the page was loading.</p>
            </div>
            <!-- Long Description (Note: See netError.dtd for used XHTML tags) -->
            <div id="errorLongDesc">
    <ul>
      <li>The site could be temporarily unavailable or too busy. Try again in a few
        moments.</li>
      <li>If you are unable to load any pages, check your computer's network
        connection.</li>
      <li>If your computer or network is protected by a firewall or proxy, make sure
        that Firefox is permitted to access the Web.</li>
    </ul>
    </div>
          </div>
          <!-- Retry Button -->
          <xul:button xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="errorTryAgain" label="Try Again" oncommand="retryThis();"/>
        </div>
        <!--
        - Note: It is important to run the script this way, instead of using
        - an onload handler. This is because error pages are loaded as
        - LOAD_BACKGROUND, which means that onload handlers will not be executed.
        -->
        <script type="application/x-javascript">initPage();</script>
      </body>
    </html>thank you for your prompt reply in advance,
    Regards,
    Mihir Pandya

    Hi, thank you for your replies, I found out few things about my servlet, and its portability
    and i have few questions, although i marked this topic as answered i guess its ok to post
    I am using javax.servlet.context.tempdir to store my files in that servletcontext temporary directory. But i dont know how to give hyperlink
    of the modified files to the user for them to download the modified files.
    What i am using to get the tempdir i will paste
    File baseurl = (File)this.getServletContext().getAttribute("javax.servlet.context.tempdir");
    System.out.println(baseurl);
    baseurl = new File(baseurl.getAbsolutePath()+File.separator+"temp"+File.separator+"files");
    baseurl.mkdirs();so i am storing my files in that temp/files folder and the servlet processes them and modifies them, then how to present them as
    links to the user for download ?
    and as the servlet is multithreaded by nature, if my servlet gets 2 different requests with same file names, i guess one of them will be overwritten
    And i want to create unique directory for each request made to the servlet , so file names dont clash.
    one another thing is that i want my servlet to be executed by my <form action> only, I dont want the user to simply type url and trigger the servlet
    Reply A.S.A.P. please..
    Thanks and regards,
    Mihir Pandya

  • Still no solution to adding a 'close this window' button to a page

    Hi can anyone help please with this problem? I have used the following html in snippets
    <form>
    <input type=button value="Close Window" onClick="javascript:window.close();">
    </form>
    which shows a button but it does not close the window in all browsers e.g. not in Safari beta or firefox.
    Thanks in anticipation
    Jimbob

    Where do you see the target='_top"? I went looking for the original button from my original post which was in the http://web.me.com/toad.hall/HelperSite//Page1_files/widget3markup.html page via the Activity window and view source and this is what the code of that widget page is:
    <xmp>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title></head><body><form>
    <input type=button value="Close Window" onClick="javascript:window.close();">
    </form> </body></html>
    </xmp> (Ignore the <xmp></xmp> tags when using)
    I don't see the target='_top" in there. What am I missing? This was my first post: http://discussions.apple.com/message.jspa?messageID=9134142#9134142.
    Thanks for the help.

  • File Upload Action Button are not working

    Hi  ,
    In the File Upload Process when the processor are open change request there are Action Buttons  Approve/Reject ,
    When the CR Processor are Click on either Approve or Reject  these two Action Button are not working (means its not show any activity) , while rest of all action button like save,close check , Run validation  are working ...
    While Processor has authorization to Approve/Reject that CR ...

    Hello Nikhilesh
    These buttons are dependent upon the workflow steps. Check that. Check the linkage for workflow. Check SWI6 - CR number and the step. Based on the step you can identify whether the proper step is assigned or not.
    Thanks
    Kiran

  • How to send query string by using form action

    Hai to all,
    I am new to this topic Ihave one doubt about jsp form action....
    That is I am using input type is submit button
    <input type="submit" name="submit" value="Edit" onclick="indows.location.href=+sample.jsp?query=+editvalue+editname">
    If I get that queryString in the sample.jsp page it respoce to the null only...... what is the problem to this code ..... please send ur perfect coding as soon as possible. I really waiting for ur replay..........

    Hai,
    I think u can use the "request.getQueryString()" to get the query string instead of using "request.getParameter()".
    From the query string value u can get the output.
    cheers,
    Redrose

  • Why is my fillable pdf "Email to" action button giving security warning. Can someone help me?

    I created a fillable pdf form with an action button that I would like users to use when submitting forms via email. I have double-checked to make sure of the correct email address, but I keep getting a security warning pop up. It states: "This document is trying to connect to: file..." and when I click allow it tells me I need to be running inside a browser to submit the form. All I want to do is allow users to send their form to a specific email address. Please help. I needed this assignment completed yesterday.

    No, I am not opening the file in a browser window.  I was trying to preview the file to make sure that it would work when it was sent to the individual via email.  Will the function only work if the user downloads it from a web page?  If so, that might explain a great deal.

  • How to get jsp page form action this page use ajax

    i want to get form action result editThree div. however, ajaxpage open new window.how to decide it?
    ajaxCallPages.js
    var loadedobjects=""
    var loadingcontainer="loading"
    var loadstatustext="<img src='images/loading.gif' />" //loading
    var rootdomain="http://"+window.location.hostname
    function ajaxpage(url, containerid ){
    var page_request = false
    if (window.XMLHttpRequest) // if Mozilla, Safari etc
    page_request = new XMLHttpRequest()
    else if (window.ActiveXObject){ // if IE
    try {
    page_request = new ActiveXObject("Msxml2.XMLHTTP")
    catch (e){
    try{
    page_request = new ActiveXObject("Microsoft.XMLHTTP")
    catch (e){}
    else
    return false
    document.getElementById(containerid).innerHTML=loadstatustext // loading
    page_request.onreadystatechange=function(){
    loadpage(page_request, containerid)
    page_request.open('GET', url, true)
    page_request.send(null)
    function loadpage(page_request, containerid){
    if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
    document.getElementById(containerid).innerHTML=page_request.responseText
    userEditIformation.jsp
    <script language="JavaScript" src="function/ajaxCallPages.js"></script>...
    <div id="editTwo">
    <table width=100% cellpadding=0 cellspacing=0 border=0>
    <tr>
    <td>
    <form name="myform" action="pages/editUser.jsp" method="post">
    <table width=100% cellpadding=0 cellspacing=0 border=0>
    <tr>
    <td>
    <table width=100% cellpadding=3 cellspacing=1 border=0 bgcolor="#cccccc">
    <tr valign=top>
    <td bgcolor="#666666" width=150 style="color:#FFFFFF;" align="right">User group:</td>
    <td bgcolor="#f5f5f5"> <select name="UserGroup" id="lgroup">
    <option>Administrator</option>
    <option>Editor</option></select>
    </td>
    </tr>
    <tr valign=top>
    <td bgcolor="#666666" width=150 style="color:#FFFFFF;" align="right">User name:</td>
    <td bgcolor="#f5f5f5"><input type="text" id="lname" name="uname" maxlength="20" value=""> </td>
    </tr>
    <tr valign=top>
    <td bgcolor="#666666" width=150 style="color:#FFFFFF;" align="right">E-Mail:</td>
    <td bgcolor="#f5f5f5"><input type="text" id="lmail" name="uemail" value="" onkeypress="return checkEnter(event);" onKeyPress="Comment = false; Email = true; PostalCode = false; Go();" onChange="this.value = ignoreSpaces(this.value);"></td>
    </tr>
    <tr valign=top>
    <td bgcolor="#666666" width=150 style="color:#FFFFFF;" align="right">New password:</td>
    <td bgcolor="#f5f5f5"><input type="password" id="lpass1" name="upass1" maxlength="20" value="" onkeypress="return checkEnter(event);" onKeyPress="Comment = true; Email = false; PostalCode = false; Go();" onChange="this.value = ignoreSpaces(this.value);"></td>
    </tr>
    <tr valign=top>
    <td bgcolor="#666666" width=150 style="color:#FFFFFF;" align="right">Verify password:</td>
    <td bgcolor="#f5f5f5"><input type="password" id="lpass2" name="upass2" maxlength="20" value="" onkeypress="return checkEnter(event);" onKeyPress="Comment = true; Email = false; PostalCode = false; Go();" onChange="this.value = ignoreSpaces(this.value);"></td>
    </tr>
    <tr valign=top>
    <td bgcolor="#666666" width=150 style="color:#FFFFFF;" align="right">Phone:</td>
    <td bgcolor="#f5f5f5"><input type="text" id="lphone" name="uphone" value="" onkeypress="return checkIt(event);" onChange="this.value = ignoreSpaces(this.value);"></td>
    </tr>
    <tr valign=top>
    <td bgcolor="#666666" width=150 style="color:#FFFFFF;" align="right">Block:</td>
    <td bgcolor="#f5f5f5">
    <table cellpadding=0 cellspacing=0 border=0>
    <tr>
    <td><input type="radio" name="ustatus" id="lradio1" value="1"></td><td>Yes </td>
    <td><input type="radio" name="ustatus" id="lradio2" value="0" ></td><td>No </td>
    </tr>
    </table>
    </td>
    </tr>
    <tr valign=top>
    <td bgcolor="#666666" width=150 style="color:#FFFFFF;" align="right">Register date:</td>
    <td bgcolor="#f5f5f5"><%getDateTimeValue valueOne= new getDateTimeValue(); out.println(valueOne.getDateTime());</td>
    </tr>
    <tr valign=top>
    <td bgcolor="#666666" width=150 style="color:#FFFFFF;" align="right">Last visit date:</td>
    <td bgcolor="#f5f5f5"><%getDateTimeValue valueTwo= new getDateTimeValue(); out.println(valueTwo.getDateTime());</td>
    </tr>
    </table>
    </td>
    </tr>
    <tr><td> </td></tr>
    <tr><td><input type="button" onclick="ajaxpage('pages/editUser.jsp', 'editThree')" value="Send"/> </td></tr>
    <tr><td height=18 id="eoncmssend"></td></tr>
    </table>
    </form>
    </td>
    </tr>
    </table></div>
    <div id="editThree">
    </div>
    editUser.jsp
    <html>
    <head>
    <link rel="stylesheet" href="css/editUser.css" type="text/css"></link>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
    <%
    String ugroup=null;
    String phone=null;
    String name=null;
    if(request.getParameter("uname")!=null){
    name=request.getParameter("uname");
    if(request.getParameter("uphone")!=null)
    phone=request.getParameter("uphone");
    out.println(name);
    out.println(phone);
    %>
    </body>
    </html>
    ../

    From the HTTP spec (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html):
    14.36 Referer
    The Referer[sic] request-header field allows the client to specify, for the server's benefit, the address (URI) of the resource from which the Request-URI was obtained (the "referrer", although the header field is misspelled.) The Referer request-header allows a server to generate lists of back-links to resources for interest, logging, optimized caching, etc. It also allows obsolete or mistyped links to be traced for maintenance. The Referer field MUST NOT be sent if the Request-URI was obtained from a source that does not have its own URI, such as input from the user keyboard.
    Referer = "Referer" ":" ( absoluteURI | relativeURI )
    Example:
    Referer: http://www.w3.org/hypertext/DataSources/Overview.html

  • Form Reset Button.. works in Pro., Doesn't in Reader

    I created a form in MS Word 2007 and converted to Actobat Pro 9.2.0 and included a reset and print button. 
    When opening the document in Reader 8.1.3, the reset button only resets some of the fields, although all of the fields are checkmarked in the reset dialog.  Also, when I click the print button, nothing happens.  I've created dozens of Acrobat forms with reset and print buttons and this is the first time I've noticed that they aren't working in Reader.
    Both functions work fine in Pro.  Yes, I am sure that the button behavior is linked to a specific action such as >File>Print for the Print Button.  This happens on more than one computer, so I don't think the problem lies with just my machine.
    Any ideas?

    As a test, what happens if you replace the Reset Form action with the following JavaScript?
    // Reset all form fields
    resetForm();

  • Disabling Action Button for only manager in Manager Self Service

         Hi people,
    I have a requirement in SSHR. I created one SIT for training assessment and added this function to Manager Self Service. So, if a manager logs into the system and clicks this function, he will be able to see the subordinates reporting to him. He can choose Action button against any of them to fill the assessment form. But the Action button is also visible against the manager name. My client Wants the Action button to be hided for Manager (as manager should not be allowed to fill his own form) and only wants action button to visible for subordinates reporting to him. Is there any way to achieve this through any profile option or personalisation
    Thanks

    Hi,
    I am not sure if it is possible through personalization please, give a try.. If this doesnt work I think you can go for user hook and put validation like if selected person is same as initiator then throw an error.
    Thanks,
    Avinash

  • Calling PLSQL Stored Procedure From HTML Form Submit Button

    Hi there,
    I am having a little difficulty with calling a stored procedure using an html form button. Here is the code I have right now...
    HTP.PRINT('<form action=ZWGKERCF.P_confdelete>');
    HTP.PRINT('<input type=''submit'' value='' Yes '' onClick=''document.getElementById("mypopup").style.display="none"''>');
    HTP.PRINT('</form></div>');Here is the issue - I need to find a way to pass variables to this stored procedure so it know what data to operate on. This stored procedure will delete data for a specific database record and I must pass three variables to this procedure to make it work.
    Lets call them class_number, term, conf These three variables will be passed and the data will be deleted and the person will see a confirmation screen once the delete query has been executed.
    So ideally I would want: ZWGKERCF.P_confdelete(class_number, term, conf) and then the stored procedure would handle the rest!
    Seems pretty simple but I am not sure how to make this happen... My thoughts were:
    Pass the data to this html form (the three fields I need) in hidden variables. Then somehow pass these using POST method to the procedure and read using GET?
    Can someone clarify what the best way to do this is? I have a feeling its something small I am missing - but I would really like some expert insight :-)
    Thanks so much in advance!
    - Jeff

    795018 wrote:
    I am having a little difficulty with calling a stored procedure using an html form button. Here is the code I have right now...
    HTP.PRINT('<form action=ZWGKERCF.P_confdelete>');
    HTP.PRINT('<input type=''submit'' value='' Yes '' onClick=''document.getElementById("mypopup").style.display="none"''>');
    HTP.PRINT('</form></div>');Here is the issue - I need to find a way to pass variables to this stored procedure so it know what data to operate on. This stored procedure will delete data for a specific database record and I must pass three variables to this procedure to make it work. The browser generates a POST or a GET for that form action, that includes all the fields defined in that form. Let's say you define HTML text input fields name and surname for the form. The URL generated for that form's submission will be:
    http://../ZWGKERCF.P_confdelete?name=value1&surname=value2The browser therefore submits the values of the form as part of the URL.
    The web server receives this. It sees that the base URL (aka location) is serviced by Oracle's mod_plsql. It passes the URL to this module. This module builds a PL/SQL block and makes the call to Oracle. If we ignore the additional calls it makes (setting up an OWA environment for that Oracle session), this is how the call to Oracle basically looks like:
    begin
      ZWGKERCF.P_confdelete( name=> :value1, surname =>  :value2 );
    end;Thus the PL/SQL web enabled procedure gets all the input fields from the HTML form, via its parameter signature. As you can define parameter values with defaults, you can support variable parameter calls. For example, let's say our procedure also have a birthDate parameter that is default null. The above call will still work (from a HTML form that does not have a date field). And so will the following URL and call that includes a birth date:
    URL:
    http://../ZWGKERCF.P_confdelete?name=value1&surname=value2&birthdate=2000/01/01
    PL/SQL call:
    begin
      ZWGKERCF.P_confdelete( name=> :value1, surname =>  :value2, birthdate => :value3 );
    end;There is also another call method you can use - the flexible 2 parameter interface. In this case the PL/SQL procedure name in the URL is suffixed with an exclamation mark. This instructs the mod_plsql module to put all input field names it received from the web browser into a string array. And put all the values for those fields in another string array. Then it calls your procedure with these arrays as input.
    Your procedure therefore has a fixed parameter signature. Two parameters only. Both are string arrays.
    The advantage of this method is that your procedure can dynamically deal with the web browser's input - any number of fields. The procedure's signature no longer needs to match the HTML form's signature.
    You can also defined RESTful mod_plsql calls to PL/SQL. In which case the call format from the web browser looks different and is handled differently by mod_plsql.
    All this (and more) is detailed in the Oracle manuals dealing with mod_plsql - have a search via http://tahiti.oracle.com (Oracle Documentation Portal) for the relevant manuals for the Oracle version you are using.
    Alternatively, simply download and install Oracle Apex (Application Express). This is a web development and run-time framework and do all the complexities for you - including web state management, optimistic locking, security and so on.

  • Create Form Print Button

    Acrobat 10.1.2
    Mac Snow Leopard
    I am not particularly experienced with Acrobat fillable forms but I've created 6 or 7 that work pretty well. My question is how do I create a Print (or Email) button on the form so that when a user filling in the form using Reader can print the form and /or email it to someone? Do I have to use Java Script to do this? Anyone have an example?
    Thanks
    John

    To print you can set up a button to execute the "File > Print" menu item or the doc.print JavaScript method. The latter is documented here: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.511.html
    There are quite a number of options, but at its simplest you can just do:
    // Show Print dialog
    print();
    If you want to email the entire filled-in document, you have to Reader-enable the document, assuming it needs to work with Reader. This should be the last thing you do before distributing it. Reader users will then be able to save and manually attach it to an email as they can with other types of files. You can also set up a button to initiate the email, either using a "Submit a Form" action or the doc.submitForm JavaScript method, or the doc.mailDoc JavaScript method, or by using the Distribute method in Acrobat. The latter will cause a Submit button to appear in the purple forms document message bar that appears at the top of the page display area.
    More info:
    doc.submitForm: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.537.html
    doc.mailDoc: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.505.html
    Form Submit tutorial: http://acrobatusers.com/tutorials/form-submit-e-mail-demystified

Maybe you are looking for

  • My imac and ipad2 will not connect to the internet with Windstream using an 2wire DSL modem.

    Help my brand new imac and ipad2 will not connect to the internet with Windstream using an "2WIRE" DSL modem.  Windstream tech service is useless.  i can connect with the built in router through Ethernet or wireless, but still no connecting to intern

  • Quicksilver and New 20" ACD - New AGP Card or Converter?

    I just purchased a new 20" Apple Cinema Display. The video card on my Quicksilver is the NVIDIA GeForce4 MX. Is there a converter I could use to connect my new display instead of buying a new video card? I had no idea it would be so difficult to find

  • Reconcile credit and debit

    hi in AR abc super user responsibility-transactions ,then in tools -View accounting form we r able to see the credit and debit entry fields also there is another 2 fields showing total debit and total credit i wanted to create a report where the clie

  • GL Account De-Activation

    Hi All, Can the system deactivate general ledger account so the account can no longer be posted to but still used in financial reporting? Thanks Sap Guru

  • Customer credit amount..

    Dear Gurus, Suppose If customer is having some credit amount in the company and no more he wants to continue his bussiness with the company then what is the procedure to clear the customers credit amount..please do the needfull Thanks in advance.. Re