JS CS3 Simple Dialog to change doc starting page.

This example presents the user a dialog telling them the what their current document starting page is. The user can then change the value and update the starting page number. For some reason I'm getting a error Cannot handle the request because a modal dialog or alert is active. I have set myDialog.close(); before the if statement so should this not stop this error?
I have not added any checks to ensure a doc is open in ID yet.
var myDialog = new Window('dialog', ' Starting Pg No');
    myDialog.dPgNo = myDialog.add('panel',undefined,'File details');
    myDialog.dPgNo.alignChildren = 'left';
    myDialog.dPgNo.myPgNo = myDialog.dPgNo.add('group');
    myDialog.dPgNo.myPgNo.group = myDialog.dPgNo.myPgNo.add('group');
    myDialog.dPgNo.btnGroup = myDialog.dPgNo.add('group');
    with (myDialog.dPgNo){
    myPgNo.group.orientation = 'column';
    myPgNo.group.alignChildren = 'right';
    myPgNo.group.preferredSize = [90,15];
    myPgNo.group.st  = myPgNo.group.add('statictext',undefined,'Your Doc starting page is:');
    myPgNo.et = myPgNo.add('edittext', undefined, app.activeDocument.pages[0].name)
    btnGroup.btn = btnGroup.add('button', undefined, 'Update');
    btnGroup.alignment = 'right';
myDialog.dPgNo.btnGroup.btn.onClick = function() {
myDialog.close();
var myPagestart = myDialog.dPgNo.myPgNo.et.text;
if (app.activeDocument.pages[0].name != myPagestart){
app.activeDocument.pages[0].appliedSection.continueNumbering = false; //<-----------ESTK stops here with the error mentioned before.
app.activeDocument.pages[0].appliedSection.pageNumberStart = parseInt(myPagestart);
app.activeDocument.pages[0].appliedSection.sectionPrefix = "";
alert("Your document start page has been changed to "+myPagestart+".");
myDialog.show();
myDialog.show();

Hi John,
You don't need to close and reopen the window. Instead of dialog use 'palette' type of the window and run the script in a persistent engine, e.g. #targetengine "session".
Kasyan
#targetengine "session"
var myDialog = new Window('palette','Starting Pg No');
    myDialog.dPgNo = myDialog.add('panel',undefined,'File details');
    myDialog.dPgNo.alignChildren = 'left';
    myDialog.dPgNo.myPgNo = myDialog.dPgNo.add('group');
    myDialog.dPgNo.myPgNo.myGroup = myDialog.dPgNo.myPgNo.add('group');
    myDialog.dPgNo.btnGroup = myDialog.dPgNo.add('group');
    with (myDialog.dPgNo){
        myPgNo.myGroup.orientation = 'column';
        myPgNo.myGroup.alignChildren = 'right';
        myPgNo.myGroup.preferredSize = [90,15];
        myPgNo.myGroup.st  = myPgNo.myGroup.add('statictext',undefined,'Your Doc starting page is:');
        myPgNo.et = myPgNo.add('edittext', undefined, app.activeDocument.pages[0].name)
        btnGroup.btn = btnGroup.add('button', undefined, 'Update');
        btnGroup.alignment = 'right';
myDialog.show();
myDialog.dPgNo.btnGroup.btn.onClick = function() {
    var myPagestart = myDialog.dPgNo.myPgNo.et.text;
    if (app.activeDocument.pages[0].name != myPagestart){
        app.activeDocument.pages[0].appliedSection.continueNumbering = false;
        app.activeDocument.pages[0].appliedSection.pageNumberStart = parseInt(myPagestart);
        app.activeDocument.pages[0].appliedSection.sectionPrefix = "";
        alert("Your document start page has been changed to "+myPagestart+".");

Similar Messages

  • How to change standard start page of AS Java

    Dear experts,
    could you please tell me - is it possible to change the start page of the SAP J2EE server (which is shown when you go to the http://<server name>:50+<system number>*100  page -
    SAP Help Portal, System information, User Management etc.)?
    Is it possible to change it to the customer page?
    I thought it is connected with HTTP provider service, but the root directory pointed where
    doesn't exists in the server (.../j2ee/docs),
    so I don't understand, from what source the standard page is retrieved and shown to the user.
    Thanks a lot!
    Andrey.

    Hello Ventsi,
    thanks a lot for clearing of the situation.
    In fact we have a question - how to show the static web page which is stored on the J2EE server instead of the standard index.html. It is not an application, but simple html page.
    In HTTP provider help we can see the following lines -
    Root Directory
    The root directory for this host. The installation program does not create the main directory for the HTTP files automatically. It must be created additionally, or the path must be redirected to an existing directory. 
    Value  ../../docs
    Start Page
    This page is displayed when the browser establishes a connection with the host. The server searches the root directory for a file that appears in the Welcome Files list. The first match found is returned to the client browser.
    So does it mean that we have to create docs directory manually and put our file into this directory? 
    Or it is the wrong approach?
    Thanks!
    Regards,
    Andrey.

  • Cannot change Firefox start page on XP, always Dell Start page.

    I cannot change the start page on Firefox on my Dell XP. I can change it on I.E., Seamonkey, and Netscape. Firefox always becomes the Dell/Google start page. I don't have the GoogleAFE nor the Browser Address Redirect programs. I don't have the My Way program. I am not using Zone Alarm (which locks the home page). No entry in the registry has a google.com/ig/dell URL. This only affect Firefox.

    See the [[Preferences are not saved]] article. If it is just the home page setting that can not be changed, the first place to check is the user.js file as shown in that article.

  • Change wiki start page

    hallo There,
    i have on my 10.5.6 OS X Server about 10 Wiki, i'd like to change the start page "wellcome.....wiki" for every wiki, i want to write another information.
    is it possible to do that? and where?
    best regards
    x-x-x

    Write your own page called welcome.html and install it into your document root. In the General panel of the website enter welcome.html as the first entry in the default page files. Remove/rename the index.html page that comes with the website setup.
    Apache will now go to your default page instead of the one supplied when you setup the website. To ensure you can reach your wikis, make sure you have a link to each group on your welcome page as in:
    mydomain.com/groups/<each group>
    HTH,
    Harry

  • Change JBoss start page

    Hello
    I do'nt know how to change the start page of JBoss. I want to redirect it to another page of my project, so when someone acceses http://localhost:8080/ I want to redirect to the login page of my project.
    If someone can help me I will be greatfull.
    Thank you.

    Write your own page called welcome.html and install it into your document root. In the General panel of the website enter welcome.html as the first entry in the default page files. Remove/rename the index.html page that comes with the website setup.
    Apache will now go to your default page instead of the one supplied when you setup the website. To ensure you can reach your wikis, make sure you have a link to each group on your welcome page as in:
    mydomain.com/groups/<each group>
    HTH,
    Harry

  • Changing the Start Page after loggin in the application

    How can we change the start page once i log in to the oracle apex application.I took the following measures to change the page number
    The default source code for the login page 101 process is
    wwv_flow_custom_auth_std.login(
    P_UNAME =&gt; :P2_USERNAME,
    P_PASSWORD =&gt; :P2_PASSWORD,
    P_SESSION_ID =&gt; v('APP_SESSION'),
    P_FLOW_PAGE =&gt; :APP_ID||':1'
    I tried to change the P_FLOW_PAGE variable to page 15 as below
    P_FLOW_PAGE =&gt; :APP_ID||':15'
    but still no luck,still the login page is redirecting me to page 1 only instead of page 15.Can any of the experts here please help.
    Thanks

    Hello
    You need to go to
    Home>Application Builder>Application 127>Shared Components>Edit Security AttributesThen edit the Home Link item.
    For example, mine is set to
    f?p=&APP_ID.:35:&SESSION.The result is that my application goes to page 35 after login.
    Hope this helps.
    Simon.

  • [JS][CS3] Simple dialog box problem

    Hi
    I am wanting to make my script do 1 of 2 things depending on the result of a dialog box.  I cannot seem to register the users response.  Here is the code:
    var myDialog = new Window('dialog', 'Confirm Changes');
    myDialog.frameLocation = [600,400];
    myDialog.size = [590, 250];
    myImage = myDialog.add('image',[480,41,572,127],'/Macintosh HD/Applications/Adobe InDesign CS3/Scripts/Scripts Panel/Images/xxxx.png');
    myPanel= myDialog.add('panel', [10,10,580,240], 'Select the action you wish to use');
    //Adding Buttons
    myUseExistingTextButton = myPanel.add('button', [48,190,75,25], 'Use Existing Text',{name:'select'});
    myUseNewButton = myPanel.add('button', [260,190,75,25], 'Use New text as shown',{name:'select'});
    myCancelButton = myPanel.add('button', [480,190,75,25], 'Cancel',{name:'select'});
    myExistingTextWindow = myDialog.add('edittext',[20,40,230,200],'Existing Text');
    myNewTextWindow = myDialog.add("edittext",[250,40,460,200],"New Text");
    myResult = myDialog.show();
    if(myResult == true)
         if (myResult == 0)
                        alert("Old was selected");
         if (myResult == 1)
                        alert("New was selected");
    which gives the following result:
    All I want to do is use the selected button do do the next part of my script depending on the text selected.
    I will keep on looking, and di-secting other scripts, but any help here would be nice.
    Thanks as always
    Roy

    Here is code created with RapidScriptUI in about 2 minutes. It includes multiline editbox, dimensions without using co-ordinates  that display accurately cross platform and simple to edit code for beginners like you to learn and understand (This is a free advertisement).
    var rapidDlg = new Window('dialog',"Confirm Changes",undefined);
    buildWindow();
    rapidDlg.show();
    function buildWindow(){
    // Properties for rapidDlg.Panel1
         rapidDlg.Panel1 = rapidDlg.add('panel',undefined,"Select the action you wish to choose");
         rapidDlg.Panel1.margins= [20,20,20,20];
         rapidDlg.Panel1.orientation = "row";
    // Properties for rapidDlg.Panel1.Group1
         rapidDlg.Panel1.Group1 = rapidDlg.Panel1.add('group',undefined);
         rapidDlg.Panel1.Group1.orientation = "column";
    // Properties for rapidDlg.Panel1.Group1.EditText1
         rapidDlg.Panel1.Group1.EditText1 = rapidDlg.Panel1.Group1.add('edittext',undefined,"Existing Text", {multiline:true});
         rapidDlg.Panel1.Group1.EditText1.preferredSize.width = 200;
         rapidDlg.Panel1.Group1.EditText1.preferredSize.height = 100;
    // Properties for rapidDlg.Panel1.Group1.ExistingText
         rapidDlg.Panel1.Group1.ExistingText = rapidDlg.Panel1.Group1.add('button',undefined,"Use Existing Text");
    rapidDlg.Panel1.Group1.ExistingText.onClick = ExistingText_Clicked;
    // Properties for rapidDlg.Panel1.Panel2
         rapidDlg.Panel1.Panel2 = rapidDlg.Panel1.add('panel',undefined,undefined);
         rapidDlg.Panel1.Panel2.alignment = [' ','fill'];
    // Properties for rapidDlg.Panel1.Group2
         rapidDlg.Panel1.Group2 = rapidDlg.Panel1.add('group',undefined);
         rapidDlg.Panel1.Group2.orientation = "column";
    // Properties for rapidDlg.Panel1.Group2.EditText2
         rapidDlg.Panel1.Group2.EditText2 = rapidDlg.Panel1.Group2.add('edittext',undefined,"New Text", {multiline:true});
         rapidDlg.Panel1.Group2.EditText2.preferredSize.width = 200;
         rapidDlg.Panel1.Group2.EditText2.preferredSize.height = 100;
    // Properties for rapidDlg.Panel1.Group2.NewText
         rapidDlg.Panel1.Group2.NewText = rapidDlg.Panel1.Group2.add('button',undefined,"Use New text as shown");
    rapidDlg.Panel1.Group2.NewText.onClick = NewText_Clicked;
    // Properties for rapidDlg.Button3
         rapidDlg.Button3 = rapidDlg.add('button',undefined,"Cancel", {name:"cancel"});
         rapidDlg.Button3.alignment = ['right',' '];
    function ExistingText_Clicked(){
         alert(this.text +  ' was clicked!');
    function NewText_Clicked(){
         alert(this.text +  ' was clicked!');
    Steven
    http://scriptui.com

  • Change my start page from Firefox to Bing

    I have set my defaults to Bing and tried everything I can think of When I open Firefox I get Firefox as my start page. I have been using Bing for years and now Its gone. I also have Explorer and it is working as allways but I prefer Firefox!

    Bookmark and use this;
    Download the '''[https://addons.mozilla.org/en-US/firefox/addon/searchreset/ Mozilla Search Reset]''' {web link}
    This add-on is very simple: on installation, it backs up
    and then resets your search preferences and home page
    to their default values, and then uninstalls itself. This
    affects the search bar, URL bar searches, and the home page.
    '''[https://addons.mozilla.org/en-US/firefox/addon/settings-guard Settings Guard for Firefox]''' {web link}
    Detects and resets changes to settings that are frequently done
    by add-ons and application installers.

  • I can't change ff start page. i edited options menu. i changed about:config /browser.starter.homepage but ff still opens with start page. i don't want this.

    everytime i start firefox it opens on firefox start page. i don't want this. i want my own home page. i have changed it several times in 'options-general-when firefox starts...' but alas to no avail..it still starts up with the firefox start page. i have also gone to 'about:config' and changed the value of 'browser.startup.homepage' to my homepage. i restarted firefox and it worked...but just the once. the next time i opened firefox it started up once again with the firefox homepage. i have done scans, i have tried to remove the hometab with various anti virus/anti malware programms.. i have sieved through my registry..it doesn't matter what i do.. firefox starts up with it's own homepage which i do not want. please can you help?.. it's driving me nuts. i don't really want to have to reinstall firefox. thanks in advance x ps. firefox also keeps crashing on me :(

    ohhh right!! i have been educating myself as i didn't understand what this user.agent.override.pref meant .. now i get it.. yes i will keep an eye on that when firefox next updates...at the moment everything is running smoothly so i'm going to leave it as it is for now. but at least now i know what it all means.. ahh you learn something new every day :-) thanks everyone x

  • The textbox for setting a start page is grayed out, and I cannot change the start page.

    When I go to Options form, the textbox for "Mozilla Firefox Start page" is grayed out, and unchangeable. If I navigate to a page, then set that as my start page, closing and restarting Firefox reverts back to the Firefox/Google startpage - my home page setting is not being saved.
    I have tried resetting Firefox, restarting with add-ons disabled, even deleting and recreating a new profile, but it still does this.

    Well, I lack the sufficient administrator privileges to uninstall the current install of Firefox, but - oddly enough - not to install a new copy to another folder.
    So I installed the software, and viola - it worked!
    Thanks!

  • Change blog start page - is it possible?

    Hi all.
    I have a blog going, started it in iWeb 1.0. However, the template is looking a little tired and limited and I quite fancy changing it to one of the new ones. I've stared at the programme for a while, but nothing's coming to me on how to do it. Is it possible? Is it simple (like me)?
    Thanks!

    Thanks. My staring at the page was leading me to the
    'start again'-type conclusion. And I think you're
    right; no one except my mother and father and wife
    want to read the old entries anyway!
    sob
    *starts again*
    Hahaha....Sorry to break it to you this way!.... You know how when you are on your very first (earliest) blog entry and you hit "Previous" the link actually takes you back to the main blog index page because there are no previous or earlier entries? Well, now you can change that one link in your new blog to point at your old blog to make the transition seamless... haha. Believe me, I know about homepages and mothers, fathers, and wives! Good luck!

  • How do I change the start page number in crystal report ?

    hi all
    i have report
    I want to do change the page number 1 and make it 5
    any help please
    thank you all

    Hi,
    Page number always start with 1 if you want to your page number to start with 5 then try this formula in place of your page number special field :
    Whileprintingrecords;
    Numbervar x:=4;
    x:=x+1;
    This will print 5 on your first page.
    Thanks,
    Sastry

  • Changing starting page number in CS4

    Hi,
    As the title suggests I want to change the starting page number using javascript.
    I know in CS5 you can use app.activeDocument.documentPreferences.startPageNumber = myNum but I can't seem to find the equivelant method for CS4.
    I can find the starting page number with app.activeDocument.pages.firstItem().name but I can't change it as it's read-only.
    Any help appreciated.
    Cheers,
    John

    With a little bit more persistence I found you can change it with:
    myDoc.sections[0].pageNumberStart = myNum;
    It wasn't easy to find though, and the data browser in the ESTK wasn't much help :-(
    Cheers,
    John

  • Change Start-Page for the Application

    Hallo,
    how can I change the Start-Page for the Application ?
    Thanks
    I. Schult transcoject Neumünster

    Another action you can take is to change the page ID in the p_flow_page argument to the wwv_flow_custom_auth_std.login call in the login process on the login page (if you have one), e.g., change P_FLOW_PAGE => :APP_ID||':1' to FLOWPAGE => :APP_ID||':99' to change the 'after login' page from 1 to 99. This will be the page (in the current application) redirected to after authentication, absent a deep link.
    The home link application attribute has limited use, e.g., for determining which page to show when you use the Run Application icon in the builder.
    Scott

  • How to chage Workspace Start Page without installing Reporting and Analysis

    Hi:
    any one know how to chage Workspace Start Page without installing Reporting and Analysis?
    thanks

    Not totally sure what you are asking but if you want to change the start page for users/groups have a read of - http://download.oracle.com/docs/cd/E17236_01/epm.1112/bpmui_admin/frameset.htm?assigning_default_preferences.html
    Cheers
    John
    http://john-goodwin.blogspot.com/

Maybe you are looking for

  • Capturing mono VHS footage, how do I convert audio to stereo?

    I am creating dvd's from some old VHS tapes, and the audio track is mono, I want to know how to convert audio to stereo? Do I start with the audio settings on Mono or stereo, and then what is the next step to get mono audio converted to stereo? As al

  • Is there a Premiere Pro User Group in the Detroit area?

    I'm an FCP refugee, working now with Premiere Pro via my Creative Cloud subscription. Sometimes it would be nice to connect with like-minded creatives in an earth-bound forum. Anyone in Metro Detroit in the same situation?

  • Could not find the file "flash.ocx"

    I have Windows XP and the latest version of Flash but keep getting a error message popping up saying - Could not find the file "flash.ocx" Does anyone know how i can sort out this problem! Thanks!

  • Logical Column Mappings update

    If I want all my Logical Columns in the Business Model layer to point to a new and different database (e.g: EIMDW) instead of "ORAEIMU", what is the quickest and easiest way to update all the column mappings at once in the Business Model Layer? Your

  • Прошивка iOS 5.1 Версия 9B179 на iPhone 4S

    При установке прошивки iOS 5.1 Версия 9B179 на iPhone 4S происходит быстрый разряд батареи при отключенных Siri, Геолокация, Wi-Fi, 3G и других приложений влияющих на разряд батареи. По сравнению с прошлой прошивкой iOS 5.0.1 батарея разрежается в 2-