Page Spawning - Prompting For Number Of Pages

I asked a similar question a few years back and at the time, the project went by the wayside.  Well, the project is back on track and now I'm in a jam and need to use some javascript for some easy automation.  Here's the situation.  I have a form with a hidden button that allows persons who know where the button is, to spawn the current semplate into additional pages, while renaming the approzimately 400+ form fields on each page.  As it currently stands, the user needs to click the hidden button each time to spawn a new page.  This is kind of cumbersome considering, I need to generate approximately 200 pages at a time.  Here is the current code (culled from any of a number of web pages) that works for the single click page addition:
// Get a template object from an existing template
var t = getTemplate("temp1");
// Spawn the template on the page following this one, and rename the fields
t.spawn({nPage: pageNum + 1, bRename: true, bOverlay: false});
What I'd like to do is have the button "click" (mouse up) produce a dialog box that asks the user to input the number of pages needed to be spawned.  I'm not concerned about page numbering as I have a separate means for doing that, once all the pages have been spawned.  Clearly, I am not a javascript programmer, so, if someone is willing to help, it's going to have to be usable code that will require only minor tinkering, if any.  Any help or ideas would be greatly appreciated.  I'm using Acrobat Pro X.  There was an MVP named George Johnson who tried to help me back them, but quite honestly, Is imply didn't know how to tie it all together.  He suggested using the following code in generating the dialog box (obviously, text is not geared toward my document).  Can someone show me how to tie all of this together?
var cResponse = app.response({
           cQuestion: "How are you today?",
               cTitle: "Your Health Status",
               cDefault: "Fine",
               cLabel: "Response:"
if (cResponse == null)
           app.alert("Thanks for trying anyway.");
else
           app.alert("You responded, \""+cResponse+"\", to the health "
                     + "question.",3);
Thank you in advance,
Randy

Greetings George!
A while back, you assisted me with the following code (see below), which was used to spawn a multi-page document.  By the way, the code was just what the doctor ordered, thank you!  I am now faced with another issue while spawning this document.  I have one field (show_num) which I need to prevent from renaming, when the document is spawned.  All other fields, rename perfectly, as desired.  I now will be utilizing this show_num field, which was previously just a place holder and not used.  Is there a way to have the field remain the same name as the pages are spawned?  In other words, I'm looking to have the user type a "show number" on the first page and have it immediately populate in the same field on all pages (i.e. 1026-022).  This number would then populate on all pages in the "show_num" field.  Here's the code I'm using to spawn the pages:
var resp = app.response({
    cQuestion: "How many pages to you want to add?",
    cTitle: "Enter number of pages to add",
    cDefault: "1",
    cLabel: "Pages:"
// Get a reference to the template to spawn
var t = getTemplate("temp1");
// Only proceed if user enteres a value,
// that can be converted to a number,
// and the number is at least 1 and no more than 600
if (resp && !isNaN(+resp) && +resp >= 1 && +resp <= 600) {
    // Round number of pages to nearest integer
    var num = Math.round(+resp);
    // Spawn the specified number of pages
for (var i = 0; i < num; i += 1) {
    if (i === 0) {
        var oXO = t.spawn({nPage: numPages, bRename: true, bOverlay: false});
    } else {
        t.spawn({nPage: numPages, bRename: true, bOverlay: false, oXObject: oXO});
    // Delete the button
    removeField("P" + (numPages - 1) + ".temp1.spawnPage");
} else {
    app.alert("You entered an invalid number: " + resp);

Similar Messages

  • How to exclude last page from the total number of pages counter

    Hi,
    I am customizing the payables remittance RTF template, our requirement is to reset page number to 1 for each payment, i am able to achieve this using "@section"
    also we have a requirement to have a summary page at the end, i am able to get this using "start@last-page:body".
    issue is last page is also considered in the page counter of the last payment.
    i.e. suppose if i am generating remittance for 2 payments which are printing details in two pages and one page respectively, my output will have total 4 pages and it's showing
    Payment1 page-1 footer -> 1 of 2
    Payment1 page-2 footer -> 2 of 3
    Payment2 page-3 footer -> 1 of 2
    Summary page-4 footer -> 2 of 2
    but i wanted to see
    Payment1 page-1 footer -> 1 of 2
    Payment1 page-2 footer -> 2 of 3
    Payment2 page-3 footer -> 1 of 1
    Summary page-4 footer -> 1 of 1
    Any idea how to remove the summary page from the page counter.
    Rgds,
    -Kamal

    I'm not sure how it was in Acrobat 9, but in XI you add a Header/Footer and
    one of the options it "Page Number and Date Format", where you can select
    the format of the page number to add, some of them contain the total number
    of pages (such as "1 of n").

  • How do I stop automatic loading of the next page as I scroll to the bottom of an internet page that has a number of pages?

    When I search with Google, as I scroll to near the bottom of the page, the next page of results automatically loads. I can never get to and use the similar searches, or "Searches related to ***", which are at the bottom of the page, as the next page loads and focuses at the top of that next page. Also, there is a bar with the page number, and a field with a "Jump to" command with a pop down arrow with page numbers, and up and down arrows beside it which go up or down one page if used.
    This does not happen with, say, Bing, nor if I use Int Expl (aagh).
    I have no autopage type of add-ons, or plugins.. I may have had an add-on at one time. There are a bunch of autopager "strings", or lines, in about:config. How do you remove them, if that is the problem?
    How do I stop this from happening? It is extremely annoying.
    Thanks,
    SK

    hello, can you try to replicate this behaviour when you launch firefox in safe mode once? if not, maybe an addon is interfering here...
    [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]]

  • Number of Page View is showing zero for Site web Analytics Reports

    Hi,
    We have enabled Site Web Analytics reports in our Site Collection but the Number of Page views is showing zero for all the dates. We have checked all the events to capture in Site Collection Audit settings, Reporting feature is also activated but still the
    count shows 0 for all the dates.
    There are other Site Collection that exists under that Web Application but they show the count for Number of Page views in Site.
    Any help would be appreciated.
    Regards,
    Vijay

    hi
    1-first check "Usage and Health Data Collection Proxy" is started, if not started:
    find usage proxy id with following command:
    Get-SPServiceApplicationProxy
    then start service with following command:
    $UsageApp = Get-SPServiceApplicationProxy | Where {$_.ID -eq "[usage proxy ID]"}
    $UsageApp.Provision()
    2-check following link:
    Popularity Trends populating 0 results
    yaşamak bir eylemdir

  • IOS prompts for a client certificate each time i change webpages on a site

    The company intranet is published through a TMG 2010 box and we use client certificates as an extra level of authentication in addition to AD user / pass.
    With any PC based browser you are prompted once for the certificate to use, however in IOS 5.1.1 on iphone and ipad we get a prompt each time you go to a new page, safari prompts for the certificate to use however the more times you change the page the more it relists the certificate in the selection window. The certificate you see in the screen shot is installed once. The first time I change the page, safari reprompts and lists 2 certificates (both the same) next time i change the page it then lists the certificate 3, then 4 then 5 times etc. The client certificate is issued directly from the root CA so this isnt the issue of IOS not supporting 2 or 3 tier certificates.
    All other PC based browsers work fine and only prompt once then happily reuse that certificate when you change pages without reprompting.

    We're experiencing the same problem.  We are also publishing internal web applications via TMG 2010, using forms based authentication with client SSL certificate authentication.
    We see this problem on devices using iOS 5.1.1.  Devices with iOS 6 are automatically selecting the client certificate.  Unfortunately upgrading to iOS 6 is currently not an option.

  • Prompt for drill down result

    All,
    I have a report like showing ProjectName, ManagerName. When I click any ProjectName it should drill to show the Project name, ManagerName , Project members name and other details . My requirement is provide a prompt for ProjectName and the Project Members Name. I have done to provide a prompt for ProjectName, but i cannot do the same for ProjectMembers prompt in drilldowned page. Can anyone help me on this

    Drill-down doesn't work like that, In other words, you can't put a prompt on a drill-down page because the "drilldown" is generated by obi based on the value selected in the parent report and the way the hierarchy was set up in the rpd.
    If you really want to have a destination page with prompts for the members, use Navigation from Value Interaction instead of drill. Then you can Navigate to another dashboard that contains both the prompt for the members and the detail report (on the destination page).

  • END-OF-PAGE not displayed in the last page of the classical report.

    Hi all..
    The END-OF-PAGE is not displayed in the last page of the classical report.
    SY-LINCT value is 30.
    Lines displayed in the report per page is 24.
    [3 for TOP-OF-PAGE and 3 for END-OF-PAGE]
    My Internal table has 6942 records.
    It comes 289 pages with 24 records in a page and 290 th page with 6 records.
    The END-OF-PAGE is not coming for the 290 th page.
    Please help.
    Thank You.
    Karthi M R.

    There are multiple links in SDN on this subject; Please search,
    end-of-page

  • Creative ALchemy home page prompting for username/passw

    The Creative ALchemy Home Page http://preview.creativelabs.com/alchemyis suddenly prompting for a username and password. Can this be fixed please?

    I think it's fixed already, at least I had no problem going there and looking at the discussion forum there. Let me know if you're still having problems.
    Dale

  • In OBIEE mobile apps designer there is no option for multi select prompts?The navigation page gives option only for single select?Is there a work around for this?

    In OBIEE mobile apps designer there is no option for multi select prompts?The navigation page gives option only for single select?Is there a work around for this?

    Nic, for me the iTunes window looks like this, when I connect my iPad 3:
    I select the iPad in the "devices" section of the Sidebar (use: "View > Show Sidebar" if the sidebar is hidden).
    Click the "Apps" tab in the "Devices" pane.
    Scroll all the way down in the Devices pane to "File Sharing" "Apps" section.
    Then do I click "GarageBand" to select the documents in the right panel.
    Which part is different for you? Perhaps you could post a screenshot?
    Regards
    Léonie

  • How do I modify the "Number of Pages" setting for an existing Master Page via javascript?

    I'm learning javascripting for InDesign and I have been tinkering with the stock scripts in the tutorials. I'm developing the ability set properties and such, playing with how Javascript works, and I wanted to change the number of pages in a master page as part of an exercise. Does anyone know how to do this? I have been able to add new masters, controlling the number of pages in them with this:
    myDocument.masterSpreads.add( {pagesPerSpread:2,} )
    but what I really want is to modify the master that InDesign automatically generates with a new document, to have 2 pages. Granted, I can just start off with a document with facing pages, but I don't really see the fun in that...

    Jump_Over wrote:
    Hi,
    check this:
    var mSpread = app.activeDocument.masterSpreads[0],
    count = mSpread.pages.length,
    mSet = 2,
    run = mSet - count;
    // to avoid 0-page error
    mSet = Math.max(mSet,1);
    if (run > 0) {
              while (run --)
              mSpread.pages.add();
    else while (run) {
              mSpread.pages[-1].remove();
              run ++
    edit the variable mSet to modify pages length
    Jarek
    Message was edited by: Jump_Over I added Math.max filter to avoid errors
    Thanks, this is exactly what I wanted. Well, almost. I wish there were a way to simply set the number of pages in a master spread to a specific number the same way there is in the interface, but this will work just as well.

  • System symbol for total number of pages in SAP Script

    Hello All,
    I need to display the total number of pages in a SAP Script. Say there are 4 pages and I want to display "Page 1 of 4" at the footer of first page.
    Is there any system symbol to get the total number of pages in SAP Script?
    Many thanks in advance for your help.
    Regards
    Indrajit Chakraborti

    Hi,
    In the Footer window, use this fields
    &Page& of &SAPSCRIPT-FORMPAGES&
    &PAGE& --> Current page No
    &SAPSCRIPT-FORMPAGES& --> Total No of pages Regards
    Regards
    Sudheer
    Message was edited by:
            Sudheer Junnuthula

  • Is there a Special Character for the number of pages in a document?

    I'm creating a template (in cs6) for a series of documents of variable length, and each document needs to be numbered with the format, "page A of Z." I see the special character for inserting the current page number (A) and I'd like to have the number of pages in the document (Z) added automatically as well. Is there a wildcard, special character, or script that will accomplish this? I'd rather not have to enter the number of pages manually as the value will change as these go through the editing process; I'd prefer to have the numbers update automatically. Has anybody done this before?

    Your first suggestion is the only way to capture the last page of a book that's comprised of independent document files. The last page number text variable works only within a single document.
    Anyone who wants a last page in book text variable badly enough can post a feature request at Wishform.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices    
    Arïel wrote:
    Stop press!
    You can also, much more simply, create a new text variable. There is
    specifically one for "last page number". That's much simpler.
    Type>Text Variables>Define>New, and in the Type dropdown just select
    "last page number".
    ariel

  • ADF security - prompt for user id and password again on page forward

    Hi,
    I am working with ADF using JDeveloper 10.1.3 with Business Components and ADF Faces.
    I have a Search page and a List page.
    Both pages are based on the same view within the same application module.
    The Search page is using the default Find and Execute Operations.
    The Execute button has an action that navigate to the List screen.
    faces-config.xml
    <navigation-rule>
    <from-view-id>/jspx/search.jspx</from-view-id>
    <navigation-case>
    <from-outcome>search</from-outcome>
    <to-view-id>/jspx/list.jspx</to-view-id>
    <redirect/>
    </navigation-case>
    </navigation-rule>
    <navigation-rule>
    <from-view-id>/jspx/list.jspx</from-view-id>
    <navigation-case>
    <from-outcome>find</from-outcome>
    <to-view-id>/jspx/search.jspx</to-view-id>
    <redirect/>
    </navigation-case>
    </navigation-rule>
    Security (Roles and Users) is based on the jazn-data.xml and web.xml
    URL Patterns for the pages have assigned to the role.
    Login Configuration is HTTP Digest Authentication
    <web-resource-collection>
    <web-resource-name>APP_SUPPORT</web-resource-name>
    <url-pattern>faces/jspx/search.jspx</url-pattern>
    <url-pattern>faces/jspx/list.jspx</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <role-name>APP_SUPPORT</role-name>
    </auth-constraint>
    <login-config>
    <auth-method>DIGEST</auth-method>
    </login-config>
    Everything is fine when running the application from JDeveloper,
    but when the application is deployed to the server (OC4J),
    After logging into the system, the Search page prompt for user id and password again
    on click of the Execute button.
    Have anyone experience this problem before?
    Thanks for any help.
    Jim

    Hi,
    does the same thing happen if you change your protected resource from:
    <web-resource-collection>
    <web-resource-name>APP_SUPPORT</web-resource-name>
    <url-pattern>faces/jspx/search.jspx</url-pattern>
    <url-pattern>faces/jspx/list.jspx</url-pattern>
    </web-resource-collection>to:
    <web-resource-collection>
    <web-resource-name>APP_SUPPORT</web-resource-name>
    <url-pattern>/faces/jspx/*</url-pattern>
    </web-resource-collection>Brenden

  • Text variable for total number of pages in book?

    Hello,
    Is it possible to create a text variable that contains the total number of pages in a book?
    The only option I see is for the total number of pages in a document, which doesn't come out right for any but the last doc in the book.
    Thanks,
    -dp-

    If you use the Cross Reference plug-in from DTPtools.com, you can create a cross ref to the last page of the book across the chapters.
    This is an old FrameMaker trick and I have not tried it with InDesign, but it should work. Test out the trial version first (do it on a copy of the book).

  • Calculations in Page /Dashboard Prompts  in OBIEE doesnt work for me .

    Hi ,
    Iam trying to create a Custom Aging Report instead of using the OOB Aging report . In the report I created column ( only at this report level) "% of Outstanding Amount in AR Past Due 1- 30 Days" by changing the "Fx" and Now I can see the $$ amount that customer has due as well as how much % is that in the total Outstanding Amount. The report is coming good. Now I have a business requirement that the groupings such as 1-30 , 31-60 , 61-90 , and 90+ should be given in dashboard prompt . I could create 1-30 , 31-60 , 61-90 but 90+ ( 91-180, 181-360 , 360+) prompt is not working as I tried to concat these three groupings and iam getting the error message as " Un resolved column error , Concat Function does not support." and other thing when i tried to create a calcualted % prompt even that is giving me error message as " Unresolved colum. I think the Calculations doesnt work for Dashboard prompts ..but iam not sure ..May be Iam missing somethg , Can anybody pls help me in getting this fixed . How to create a calculation for page/Dashbaord Prompts ...I tried using the sql too but still it gives the error.
    Please help
    Thankyou
    Karthik

    In your dashboard prompt properties you need to tick the 'Constrain' box for all the columns that you want be constrained by the other choices, e.g Year, Quarter, Month.
    Only tick Product Name / Order Name if you want these to be constrained also but bear in mind it could cause a performance delay if you are having to join tables to get the constrain.
    Hope this helps,
    Regards
    Alastair

Maybe you are looking for

  • Ios5 hangs iPod touch

    I applied the iOS5 upgrade to my WiFi only iPod touch, and all indicated that it went well. Then on reboot of the device it wanted some configuration; WiFI connection, "Backup to iCloud?" and "Find my iPod touch". It is now stuck on the later one, an

  • Sql Server Agent Job Execution

    Hi All, I want to run a sql agent job (one job is execution one package) in such a way that as soon as job1 completes , it should be run again (without any time loss) I am folowing Below approach: Job 1 has 2 steps , in both the steps I am calling sa

  • IPhone crashed while taking a picture then rebuilt library????

    I was in the middle of taking a picture, and my iPhone 3gs iOS 4 crashed. I turned it back on, and went to find the picture i took. When i clicked on photo albums, or whatever its called.. it said loading.. rebuilding library. (something like that) a

  • SUN WEB SERVER WON'T START AFTER CHANGING JVM & CLASSPATH

    hi all, i have a sunfire 280r box running solaris 8 which i installed with sun web server 6.0 sp11. the default java is root@smartvideo1 # java -version java version "1.2.2" Solaris VM (build Solaris_JDK_1.2.2_10, native threads, sunwjit) but this is

  • IOS 5 Update - Not possible to recover Purchased apps after having changed the country of origin

    All I am currently struggling to restore my apps that I have purchased on my iPhone 4. I can see my purchase history but here is the problem: The majority of the apps were purchased when my iTunes account was still linked to my German bank account/Re