Using Javascript to go to next page

I'm trying to figure out how to advance to the next page in a captivate 3 course using Javascript. We have navigation buttons for "Prev" and "Next", but I'd like to be able to call some JavaScript when they click the Next button on a particular page, and then at the same time, advance to the next page.
This is being launched from an LMS. The initial JS is going to set the score to 100%, which works fine. We typically have a "Close Course" button on the last slide to make sure it passes back a 100%, but many students are not clicking that button and the course simply returns a "passed" with a 0%.
So making this JS call as part of the "Next" button should result in more 100% scores when they get to the end of the course, but I need it also to advance to the next slide.
Thanks for any assistance!
John

Hi there
Methinks you are overthinking this. Here's why.
Note that any Button or Click Box obeject will release the pause when it has been clicked by the user unless you specifically configure it not to. If you assign some JavaScript to the Button object and the user clicks it, it does two things.
Carries out the assigned action
Releases the pause so the movie continues playing
So I'm thinking in this case it's a simple matter of timing.
Cheers... Rick
Click here for Adobe Authorized Captivate and RoboHelp HTML Training
Click here for the SorcerStone Blog
Click here for RoboHelp and Captivate eBooks

Similar Messages

  • Using javascript in modified Aperture web page themes

    Thanks to the many well-written tutorials on the subject, I've been able to modify an existing Aperture web theme to export customized web pages that have the exact look I'm after. I've successfully copied the Stock theme, edited the detail and journal-gallery html along with the global.css files and merged with a professional template I purchased, so now my Aperture-generated galleries look just like the rest of the pages on my web site.
    Of course, there's always a problem:
    If I reference any Javascript from the Aperture template files, Aperture EXECUTES the script during the process of exporting the web pages, and includes the result of the Javascript execution in the rendered HTML. It does this IN ADDITION to correctly writing the Javascript reference to the rendered page. The end result is TWO of everything. An example will make this more clear:
    If I include the following line in journal-gallery.html:
    <script language="JavaScript" type="text/javascript" src="assets/scripts/sidebar.js"></script>
    and the file sidebar.js contains:
    document.write('Home
    document.write('<'t find a single reference to the use of scripts. CLEARLY APERTURE KNOWS ABOUT JAVASCRIPT AND EXPECTS TO FIND IT BECAUSE IT'S EXECUTING ANY SCRIPT IT COMES ACROSS!!!
    The goal of all this, of course, is what any large professionally-done web site strives for: I don't want to re-render all my static content (the photo galleries) every time I add or remove a link in the sidebar. Editing sidebar.js should be all that's required to change the links.
    Anyone?

    Sorry, I see that the Javascript snippets in my original post are being executing by the web browser when the message is read.
    The 2 lines of Javascript, cleverly (ahem) encoded, might be visualized:
    document (dot) write ( <html anchor tag>Home<close html anchor tag>);
    document (dot) write ( <html anchor tag>Site Map<close html anchor tag>);

  • HttpURLConnection : unable to use cookie to go to next page

    Hi,
    I'm trying to login a form by using java application. I'm successfully login in and http return 200 response code for me. i had set the cookie for the page.
    Now, i try to access the another page of the web and it seems like unable to use the cookie to access the page and the http return 500 response code to me. The code is like below :-
    URL login = new URL(loginPageURL+"?id=" + wbUser + "&passwd=" + wbPassword+ "&login=Login");
                HttpURLConnection loginConn = (HttpURLConnection)login.openConnection();
                loginConn.setFollowRedirects(false);
                loginConn.setInstanceFollowRedirects(false);
                loginCookie = loginConn.getHeaderField("Set-Cookie");
                if (loginCookie == null) {
                    System.out.println("Web Page Login Fail --- COOKIE NOT FOUND");
                    log.writeLog("Web Page Login Fail --- COOKIE NOT FOUND");
                } else {
                    System.out.println("Web Page Login (login_cookie: " + loginCookie+")");
                    log.writeLog("Web Page Login (login_cookie: " + loginCookie+")");
                System.out.println("response code : " + loginConn.getResponseCode());
                //use the login cookie to go to other page
                URL url = new URL(wbIndex);
                HttpURLConnection urlConn = (HttpURLConnection)url.openConnection();
                urlConn.setRequestMethod("POST");
                urlConn.setRequestProperty("Cookie", loginCookie);
                urlConn.setRequestProperty( "Content-Encoding", "big5" );
                urlConn.setRequestProperty( "Content-Type", "text/html" );
                urlConn.setDoInput(true);
                urlConn.setDoOutput(true);
                urlConn.setUseCaches(false);
                urlConn.setDefaultUseCaches(false);The http return this error code : -
    java.io.IOException: Server returned HTTP response code: 500
    Can anyone please help me on this??
    Thanks a lot..........

    Hello, wnnsiau
    Thank you for visiting Apple Support Communities.
    If your account is disabled, see the steps in the article below.
    Apple ID: 'This Apple ID has been disabled for security reasons' alert appears
    http://support.apple.com/kb/ts2446
    If you have tried the steps above and this issue persists, see the article below.
    Apple ID: Contacting Apple for help with Apple ID account security
    http://support.apple.com/kb/HT5699
    Cheers,
    Jason H.

  • How to use javascript functions in struts jsp page

    hi
    iam using struts jsp pages. here iam calling one javascript function. but iam not able to access the form in javascript.
    wat i have to give as form name to get the elements of the form.
    please reply me soon
    it is urgent
    vamsi

    your form has no name liek this one:
    <html:form action="/userRegistration.do" >so you cannot access the elements inside your form?
    accessing the elements inside the form will be like this:
    document.forms[0].propertyName.value;

  • How to get page number from the PDF using Javascript

    Hi,
    We are having list of Single page PDF. The pdf are named in the order,
    ISBN_Author_01.PDF  (with real page number as i)
    ISBN_Author_02.PDF  (with real page number as ii)
    ISBN_Author_03.PDF  (with real page number as iii)
    ISBN_Author_04.PDF  (with real page number as 1)
    ISBN_Author_05.PDF  (with real page number as 2)
    ISBN_Author_06.PDF  (with real page number as 3)
    ISBN_Author_nn.PDF  (with real page number as 500)
    Here each pdf has a page number and in sequential order.
    The task is to check whether all the pdfs are in sequential order (i.e i, ii, iii, 1, 2, 3). If any page is missing, the script should throw an error report.
    To do this task, I am writing a Javascript to get the real page number from the PDF.
    Can anybody help me how to get the page number from the PDF using Javascript.
    Thanks,
    Gopal

    The "real" page number within a PDF is the count of the physical page starting at 0, zero.
    pageNum numPages
    The number printed on each page is the page label.
    setPageLabels  getPageLabel
    You will have to open each PDF and your script would need to know the page label for that file. I would expect you would need to build a 2 dimensional  array of the file names and the page label for the page within that array.

  • Problem with "Next Page" And "Zoom" in CrystalReportViewer With VS 2010

    Hello,
    i am using crystal report v 13 sp1 with visual studio 2010,
    As mebtioned, the next page and the zoom is not working in my report, whiwh has as data source "Stored Procedure"
    This is my code, and i think it's correct, i was using this code in previous versions of crystal report (cr10) and it worked fine,
    When i used the Data set , the next page and zoom worked fine, but with stored procedure it doesn't work,
    Note: when i open the Tree of Data on the left, then click on the next page or the zoom, it become funtional, it's very weird,
    protected void *Page_Init*(object sender, EventArgs e)
    if (!IsPostBack)
    reportDocument = (ReportDocument)this.Page.Session ["_reportDocument"];
    if (reportDocument != null)
    string rptFile = reportDocument.FileName.Split('
    ', '/').Last();
    LoadReportRessource(reportDocument);
    TableLogOnInfo log = new TableLogOnInfo();
    ConnectionStringSettings conn = WebConfigurationManager.ConnectionStrings[0]; //la premiere connectionstring
    SqlConnectionStringBuilder SConn = new SqlConnectionStringBuilder(conn.ConnectionString);
    log.ConnectionInfo.ServerName = SConn.DataSource;
    log.ConnectionInfo.DatabaseName = SConn.InitialCatalog;
    log.ConnectionInfo.UserID = SConn.UserID;
    log.ConnectionInfo.Password = SConn.Password;
    log.ConnectionInfo.Type = ConnectionInfoType.SQL;
    for (int i = 0; i < reportDocument.Database.Tables.Count; i++)
    reportDocument.Database.Tables.ApplyLogOnInfo(log);
    for (int i = 0; i < CrystalReportViewer1.LogOnInfo.Count; i++)
    CrystalReportViewer1.LogOnInfo.ConnectionInfo = log.ConnectionInfo;
    CrystalReportViewer1.ParameterFieldInfo = (ParameterFields)this.Page.Session ["_paramFields"];
    CrystalReportViewer1.ReportSource = reportDocument;
    CrystalReportViewer1.DataBind();
    CrystalReportViewer1.ShowFirstPage();
    else
    CrystalReportViewer1.ReportSource = (ReportDocument)this.Page.Session ["_reportDocument"] ;
    Edited by: Soumaya on Sep 7, 2011 6:16 PM

    @Don:
    Sorry, but i donno what do you mean by "what is the App Pool running in 32 or 64 bit?",
    i am running the application locally, ( the IIS is installed locally ),
    as i told you, my OS is 64bit,
    And yes i tried a very simple report, with just one field , and the "next button" is also not working,
    Its only not working with stored procedure, in the others methods ( push or pull method is working fine)
    i think its a problem in refreshing page, because when i open the tree on the left, then click on next page or zoom, its works fine
    @Ludek:
    i changed my code as below, and it doesn't solve my problem:
            ReportDocument reportDocument;
            protected void Page_Init(object sender, EventArgs e)
                if (!IsPostBack)
                    reportDocument = (ReportDocument)this.Page.Session["_reportDocument"];
                    if (reportDocument != null)
                        string rptFile = reportDocument.FileName.Split('
    ', '/').Last();
                            TableLogOnInfo log = new TableLogOnInfo();
                            ConnectionStringSettings conn = WebConfigurationManager.ConnectionStrings[0];
                            SqlConnectionStringBuilder SConn = new SqlConnectionStringBuilder(conn.ConnectionString);
                            log.ConnectionInfo.ServerName = SConn.DataSource;
                            log.ConnectionInfo.DatabaseName = SConn.InitialCatalog;
                            log.ConnectionInfo.UserID = SConn.UserID;
                            log.ConnectionInfo.Password = SConn.Password;
                            log.ConnectionInfo.Type = ConnectionInfoType.SQL;
                            for (int i = 0; i < reportDocument.Database.Tables.Count; i++)
                                reportDocument.Database.Tables<i>.ApplyLogOnInfo(log);
                        this.Page.Session["_reportDocument"] = reportDocument;
                        CrystalReportViewer1.ParameterFieldInfo = (ParameterFields)this.Page.Session["_paramFields"];
                        CrystalReportViewer1.ReportSource = reportDocument;
                        CrystalReportViewer1.ShowFirstPage();
                else
                    CrystalReportViewer1.ReportSource = this.Page.Session["_reportDocument"];
    Edited by: Soumaya on Sep 8, 2011 10:39 AM

  • How to use JavaScript in Web bean generated JSP

    I want to do some simple JavaScript validations (for example, checking if a particular field is empty) in the JSP page rendered by the data web bean. Because the HTML is rendered by the bean, I'm not able to refer to the HTML controls in the JSP page. I'm not even able to refer to the form with the following standard piece of JavaScript code - "document.forms[0].control_name".
    Is anybody aware of how to use JavaScript with these rendered JSP pages?

    You just have to add it like and applet , including this line in your JSP or JSF
    <script src="http://dl.javafx.com/dtfx.js"></script>Then add the applet
    <script>
        javafx(
                  archive: "./resources/jar/Draw.jar",
                  width: 400,
                  height: 200,
                  code: "Draw",
                  name: "Draw"
    </script>./resources/jar/Draw.jar - is the path and the name of the jar

  • Consolidation of Descendant Selectors Using JavaScript

    QUESTION:  How does one use Javascript to apply a CSS rule to a descendant set of selectors?
    BACKGROUND
    With each <li> tag (shown) there is associated a unique <body> tag (not shown).  Further, each <li> tag is grouped together with other <li> tags under the same <div> tag (shown).  All tags involved in this rule are uniquely identified with an id attribute.  Obvious, perhaps, there will be a unique webpage for each <li> tag.
    By way of example, if I were writing the rule for the tag <li id="setting"> of a single page, I would write it as follows:
    body#bodysetting div#probablepast li#setting {
         background-color:#AAA;
         color:#000;
    Note that the id of the <body> tag in the above example was obtained by prepending the word body before the id of the <li> tag.
    OBJECTIVE: With there being so many <li> tags, I am thinking that I should write a JavaScript that would repeat the above pattern for each and every tag.
    PROPOSAL:  For the moment, I am considering placing the <div> tag identifiers in one array, the <li> tag identifiers in another array, and then creating still another array for the <body> tag identifiers by prepending the word body to each element of the <li> tag array. A set of loop statements would then concatenate the tags and identifiers for each <li> tag into a single set of descendant selectors such as I have provided above and generate the same CSS rule for each new page when it opens.
    DISCLAIMER:  I realize that it would be sufficient to simply use the id of each <li> tag, but I would like to preserve the above structure for the sake of logical coherence and in anticipation of other behaviors that I have yet to develop.
    THE SELECTORS
    div#probablepast
    li#setting
    li#resistance
    li#ideology
    li#containment
    li#reforms
    li#deception
    div#popularpresent1
    li#peaceful
    li#industrious
    li#studious
    li#polite
    li#difficult
    li#closed
    li#traditional
    li#unique
    div#popularpresent2
    li#authoritarian
    li#mercantilist
    li#hightrust
    li#collective
    li#ricevillage
    li#neurotic
    li#racialpurity
    div#bridgingthegap
    li#gap
    li#identity
    li#shadows
    li#dilemma
    li#moreunique
    div#contemporaryjapan
    li#auntmadoka
    li#chishiki
    li#instruction
    li#worldwithin
    li#pyrimidal
    li#gaijinsama
    div#overcomingthebarriers
    li#culture
    li#genes
    li#nationalidentity
    li#bordercrossing
    li#language

    Murray *ACE* wrote: I am confused as to why you would want to style each list element uniquely.  It obviously is something of great importance (although I cannot think of an instance where I would want to do such a thing).
    With a little help you probably can:
    body#bodysetting li#setting {style definition}
    and
    li#setting {style definition}
    are not the same when the page is constantly changing as it does with "persistent page indicators".
    Murray *ACE* wrote: In that case, using javascript to accomplish something of great importance is a risky thing to do....
    Yes and no.  My Google stats tell me that 97% of my viewers are using Javascript when they view my pages.  This is an extraordinarily high proportion that is well worth targeting.  I can dream about the luxury of 100% accessibility after I begin receiving my expected book royalties. 
    For some, being generous is a way of life.  For others, it is a way of making a name for themselves while engaging in legalized tax evasion.  For me, it is a feeling that ebbs and flows according to the behavior of those who stand to benefit from my generosity.
    Thank you for your continued interest.
    Roddy

  • Finding a component inside jsf fragment using javascript in adf

    Hello all,
    I am using jdeveloper 11.1.1.5.
    I want to find a component inside my jsf frgament using javascript.
    Like inside jspx page I was able to find the component using
    AdfPage.PAGE.findComponentByAbsoluteId("ID");
    Now my requirement is I have a jsf fragment and I want to find component inside jsf frgament using javascript.
    How can I find the component?
    Please suggest
    Thanks
    Edited by: Navin K on Dec 21, 2011 4:24 PM

    Hi all..
    I am using Jdeveloper 11.1.2.1.0
    The code i used is given below. When i run this i always getting the message (ie region not found) in the else case of java script.
    How can i solve this. How can i take the region r1 in the javascript..
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <af:document title="Index.jsf" id="d1">
    <af:messages id="m1"/>
    <af:form id="f1">
    <af:pageTemplate viewId="/AssetTrackingTemplate.jsf" id="pt1">
    <f:facet name="top"/>
    <f:facet name="first">
    <af:panelAccordion id="pa1">
    <af:showDetailItem text="Master Details" id="sdi1">
    <af:spacer width="10" height="10" id="s3"/>
    <af:commandLink text="Home" id="cl8" inlineStyle="font-size:small; font-weight:bold;">
    <af:setActionListener from="/WEB-INF/task-flow-Home.xml#task-flow-Home"
    to="#{pageFlowScope.dynRegionBean.taskFlowId}"/>
    </af:commandLink>
    <af:spacer width="10" height="10" id="s1"/>
    <af:tree value="#{bindings.GenTopMenu1.treeModel}" var="node"
    selectionListener="#{bindings.GenTopMenu1.treeModel.makeCurrent}"
    rowSelection="single" id="t1">
    <f:facet name="nodeStamp">
    <af:group id="g1">
    <af:outputText value="#{node.Description}" id="ot2"
    rendered="#{node.MenuType==1}"/>
    <af:commandLink text="#{node.Description}" id="cl1"
    rendered="#{node.MenuType==2}" partialSubmit="true"
    immediate="false"
    actionListener="#{pageFlowScope.dynRegionBean.launchTaskFlow}">
    <f:attribute name="Definition" value="#{node.Definition}"/>
    </af:commandLink>
    </af:group>
    </f:facet>
    </af:tree>
    </af:showDetailItem>
    </af:panelAccordion>
    </f:facet>
    <f:facet name="middle">
    <af:region value="#{bindings.dynamicRegion1.regionModel}" id="r1"/>
    </f:facet>
    <f:facet name="end"/>
    <f:facet name="copyright">
    <af:outputText value="All Rights Reserved By Innovation ITC" id="ot1"
    inlineStyle="text-align:center; color:inherit;"/>
    </f:facet>
    </af:pageTemplate>
    </af:form>
    <f:facet name="metaContainer">
    <af:resource type="javascript">
    function customHandler(event) {
    var region=AdfPage.PAGE.findComponentByAbsoluteId("r1");
    if(region!=null)
    alert("Region Found");
    var exportCmd = region.findComponent("cb1");
    var actionEvent = new AdfActionEvent(exportCmd);
    actionEvent.forceFullSubmit();
    actionEvent.noResponseExpected();
    actionEvent.queue();
    else {
    alert("Region Not Found")
    </af:resource>
    </f:facet>
    </af:document>
    </f:view>
    Thanks,
    gtg.
    Edited by: gtg on 08-Feb-2012 00:14

  • How do you create a login page using dashcode for the iPhone's mobile safari that will transfer you to the next page?

         Hey I have created a login page in Dashcode for a mobile safari app (aka iphone web app) and I am having trouble since I can not find any useful info about multiple pages. I don't want to use a stack layout view because it is only a login page and I need to check with a database to make sure the user's login info is correct. Right now I have it set up so that it loads another iphone web app project once it validates the info.
         The only problem with this is I am having a good bit of trouble trying to pass values from my php code to javascript or html. For some reason calling the javascript inside the php code makes the actual code inside the app not be called and same with the echo statment for the html.
    So I would like to be able to create the app in this way:
    Login page > PHP > MS SQL > PHP > UNKNOWN (if I can't get the javascript or html to output both) > Secure info on the next page
         I believe It would be a lot easier if I had the option for a multiple page but instead I am having to load up an entirely new dashcode project. If anyone knows a better way please let me know. Or if anyone knows a link to good information on passing values from php to javascript, because I couldn't get any of the code I tried to work, I would really appreciate it.

    Addendum to previous reply:
    OK.  This is weird--but I should be used to that, and just grateful that it seems to work (for now).
    What I had done is FTPd some image files to my site using Filezilla, but when I had tried to access them, I was unsuccessful.  I am almost sure that I used the same url (and variations of it) as you suggested, namely,  http://mysite.verizon.net/username/filename , and it either did not work, or gave me the "Page under construction", or, in some cases asked me for my username and password.
    But, when I did it this time, it worked.  So I probably had something off, but I can now do what I want.
    By the way, if you'll permit another question, while on the site-builder site, it said that there was a "Web Photo Manager", and said that "To download the Web Photo Manager: Open the Site Builder application and go to the All My Sites page. Click on the Web Photo Manager link (listed under Advanced Building Tools )."  I can't find it--would you happen to know where it is?
    In any case, thanks a lot for all your help--it solved my problem. 

  • How to show modal window without popup in a web page using javascript

    Hi,
    How to show modal window without popup in a web page using javascript, means when the modalwindow is opened it should not ask for popup blocker alert......
    pls help me.....

    Thanx for ur reply,
    Actually the senario is when i click on a button, another jsp page should be displayed in a modal window without popup, but the functions alert() and confirm() will not accept the url path of the another jsp page...

  • I prepare chronologies in word, and i am trying to do the same in pages using tables and cells. But somtimes i need a cell to wrap onto the next page but I can't work out how to do it - any suggestions would be greatly appreciated

    I prepare chronologies in word, and I am trying to do the same in pages using tables and cells. But sometimes I need a cell to wrap onto the next page because the contents are bigger than the page or the space left on the page,  but I can't work out how to do it - any suggestions would be greatly appreciated

    brendanfromsydney wrote:
    What are the different opinions on why pages should not achieve this?
    As far as I know, Apple is free to choose to offer this or that feature.
    They never said that they want to clone Word or even compete with it.
    Differences between tables in both worlds are numerous.
    In Pages (or Numbers)
    - we can't sort a single column
    - we can't sort by row
    - we can't insert or remove a single cell
    - a cell can't cross pages boundaries
    If I understand well these design choices match :
    ++-+-+-+-+-+-+-+-++
    Apple Human Interface Guidelines:
    Apply the 80 Percent Solution
    During the design process, if you discover problems with your product design, you might consider applying the 80 percent solution‚ that is, designing your software to meet the needs of at least 80 percent of your users. This type of design typically favors simpler, more elegant approaches to problems.
    If you try to design for the 20 percent of your target audience who are power users, your design may not be usable by the other 80 percent of users. Even though that smaller group of power users is likely to have good ideas for features, the majority of your user base may not think in the same way. Involving a broad range of users in your design process can help you find the 80 percent solution.
    +-+-+-+-+-+-+-+-+-++
    Yvan KOENIG (VALLAURIS, France) jeudi 9 juin 2011 16:03:52
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.7
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • How to change the header and footer in the Section Breaks Next Page using OpenXML?

    I have a word document file in which I added a Section Break of Next Page, now I want to change the header and footer of that page.
    Scenario of example, I have a doc file which has four pages with headers and footers and added fifth page in the section break next page, I want to change the header and footer of the fifth page only. This is achievable manually by deselecting the Link to Previous
    button in the Word Application but I don't know how to change it using XML?
    My code that adds the new page in the section breaks is:
    class Program
    static void Main(string[] args)
    string path = @"C:\Riyaz\sample.docx";
    string strtxt = "Hello This is done by programmatically";
    OpenAndAddTextToWordDocument(path,strtxt);
    public static void OpenAndAddTextToWordDocument(string filepath, string txt)
    using (DocX document = DocX.Load(@"C:\Riyaz\sample.docx"))
    document.InsertSectionPageBreak();
    Paragraph p1 = document.InsertParagraph();
    p1.Append("This is new section");
    document.Save();
    Please help.

    Here is the sample for your reference:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using DocumentFormat.OpenXml;
    using DocumentFormat.OpenXml.Packaging;
    using DocumentFormat.OpenXml.Wordprocessing;
    namespace WordAddNewFooterHeader
    class Program
    static void Main(string[] args)
    string path = @"E:\Document\TestHeaderandfooter-Copy.docx";
    string strtxt = "OpenXML SDK";
    OpenAndAddTextToWordDocument(path, strtxt);
    public static void OpenAndAddTextToWordDocument(string filepath, string txt)
    // Open a WordprocessingDocument for editing using the filepath.
    WordprocessingDocument wordprocessingDocument = WordprocessingDocument.Open(filepath, true);
    MainDocumentPart part = wordprocessingDocument.MainDocumentPart;
    Body body = part.Document.Body;
    //create a new footer Id=rIdf2
    FooterPart footerPart2 = part.AddNewPart<FooterPart>("rIdf2");
    GenerateFooterPartContent(footerPart2);
    //create a new header Id=rIdh2
    HeaderPart headerPart2 = part.AddNewPart<HeaderPart>("rIdh2");
    GenerateHeaderPartContent(headerPart2);
    //replace the attribute of SectionProperties to add new footer and header
    SectionProperties lxml = body.GetFirstChild<SectionProperties>();
    lxml.GetFirstChild<HeaderReference>().Remove();
    lxml.GetFirstChild<FooterReference>().Remove();
    HeaderReference headerReference1 = new HeaderReference() { Type = HeaderFooterValues.Default, Id = "rIdh2" };
    FooterReference footerReference1 = new FooterReference() { Type = HeaderFooterValues.Default, Id = "rIdf2" };
    lxml.Append(headerReference1);
    lxml.Append(footerReference1);
    //add the correlation of last Paragraph
    OpenXmlElement oxl = body.ChildElements.GetItem(body.ChildElements.Count - 2);
    ParagraphProperties paragraphProperties1 = new ParagraphProperties();
    SectionProperties sectionProperties1 = new SectionProperties() { RsidR = oxl.GetAttribute("rsidR", oxl.NamespaceUri).Value };
    HeaderReference headerReference2 = new HeaderReference() { Type = HeaderFooterValues.Default, Id = part.GetIdOfPart(part.HeaderParts.FirstOrDefault()) };
    FooterReference footerReference2 = new FooterReference() { Type = HeaderFooterValues.Default, Id = part.GetIdOfPart(part.FooterParts.FirstOrDefault()) };
    PageSize pageSize1 = new PageSize() { Width = (UInt32Value)12240U, Height = (UInt32Value)15840U };
    PageMargin pageMargin1 = new PageMargin() { Top = 1440, Right = (UInt32Value)1440U, Bottom = 1440, Left = (UInt32Value)1440U, Header = (UInt32Value)720U, Footer = (UInt32Value)720U, Gutter = (UInt32Value)0U };
    Columns columns1 = new Columns() { Space = "720" };
    DocGrid docGrid1 = new DocGrid() { LinePitch = 360 };
    sectionProperties1.Append(headerReference2);
    sectionProperties1.Append(footerReference2);
    sectionProperties1.Append(pageSize1);
    sectionProperties1.Append(pageMargin1);
    sectionProperties1.Append(columns1);
    sectionProperties1.Append(docGrid1);
    paragraphProperties1.Append(sectionProperties1);
    oxl.InsertAt<ParagraphProperties>(paragraphProperties1, 0);
    body.InsertBefore<Paragraph>(GenerateParagraph(txt, oxl.GetAttribute("rsidRDefault", oxl.NamespaceUri).Value), body.GetFirstChild<SectionProperties>());
    part.Document.Save();
    wordprocessingDocument.Close();
    //Generate new Paragraph
    public static Paragraph GenerateParagraph(string text, string rsidR)
    Paragraph paragraph1 = new Paragraph() { RsidParagraphAddition = rsidR };
    ParagraphProperties paragraphProperties1 = new ParagraphProperties();
    Tabs tabs1 = new Tabs();
    TabStop tabStop1 = new TabStop() { Val = TabStopValues.Left, Position = 5583 };
    tabs1.Append(tabStop1);
    paragraphProperties1.Append(tabs1);
    Run run1 = new Run();
    Text text1 = new Text();
    text1.Text = text;
    run1.Append(text1);
    Run run2 = new Run();
    TabChar tabChar1 = new TabChar();
    run2.Append(tabChar1);
    paragraph1.Append(paragraphProperties1);
    paragraph1.Append(run1);
    paragraph1.Append(run2);
    return paragraph1;
    static void GenerateHeaderPartContent(HeaderPart hpart)
    Header header1 = new Header();
    Paragraph paragraph1 = new Paragraph();
    ParagraphProperties paragraphProperties1 = new ParagraphProperties();
    ParagraphStyleId paragraphStyleId1 = new ParagraphStyleId() { Val = "Header" };
    paragraphProperties1.Append(paragraphStyleId1);
    Run run1 = new Run();
    Text text1 = new Text();
    text1.Text = "";
    run1.Append(text1);
    paragraph1.Append(paragraphProperties1);
    paragraph1.Append(run1);
    header1.Append(paragraph1);
    hpart.Header = header1;
    static void GenerateFooterPartContent(FooterPart fpart)
    Footer footer1 = new Footer();
    Paragraph paragraph1 = new Paragraph();
    ParagraphProperties paragraphProperties1 = new ParagraphProperties();
    ParagraphStyleId paragraphStyleId1 = new ParagraphStyleId() { Val = "Footer" };
    paragraphProperties1.Append(paragraphStyleId1);
    Run run1 = new Run();
    Text text1 = new Text();
    text1.Text = "";
    run1.Append(text1);
    paragraph1.Append(paragraphProperties1);
    paragraph1.Append(run1);
    footer1.Append(paragraph1);
    fpart.Footer = footer1;
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I would like to know why when i make a web page and test in my local browser it works fine then when i tranfer to my server i does not work fine example i used javascript to put a prompt bar on a page and it worked fine local but on server not working

    how come when i make a web site and i test it in my local server it works fine when i tranfer to server certain things do not work example i used javascript to put in a prompt bar for a newsletter page at the server it did not work but at local it did also it works at MOZZILLA but not internet explorer i also have cs4 was wondering if there is a way to test a page in dreamweaver and then transfer   THANK YOU X-FACTOR-MEDIA

    In future, please try to make the subject line of your posts shorter. In this case the following would have been sufficient: "JavaScript works locally, but not on remote server".
    Short, but meaningful subject lines make it easier for others to identify what your question is about, and often bring faster help.

  • HT201269 I'm trying to set up my new iPhone using iCloud - I entered my apple ID and password and selected the backup to restore from but the next page asks me to enter a password for a DIFFERENT apple ID

    I'm trying to set up my new iPhone using iCloud - I entered my apple ID and password and selected the backup to restore from but the next page asks me to enter a password for a DIFFERENT apple ID

    What different Apple ID? Yours? Your friends? Your dogs... ? I think we are going to need more information. You're probably best setting up the phone as a new phone and restoring from iCloud later on.

Maybe you are looking for

  • How to resolve message "Installer database is corrupt" when trying to install CS4 on Win 8.1?

    I purchased a disk set of CS4 a few years back and have recently purchased a new computer. When trying to install CS4 on the new computer, I received an error message saying "Installer database is corrupt. Please contact Adobe Customer support." Call

  • Login issue in CSM

    Hi All, After adding the ACS in CSM ,I am unable to login the CSM with the ACS username and password and also the admin username and password. Now i removed the csm server in ACS even then same status.How to login the csm ?

  • SQL Developer 3.2 - Connection reset

    Hi, I've installed SQL Developer 3.2 build MAIN-09.30 under Windows 7 64 bit and Client 11g 64 bit. Wherever server I try to connect, when I click on a table I have the connection reset and it tries to fetch data with no success, i.e. the Results dis

  • Inserting Flash Problem no ID in the object tag

    Notice the id property in the object tag. <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase=" http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve rsion=7,0,19,0" width="550" height="400" id="source2"> Well Contr

  • Schemas and Parsers

    Hi, i've making a web application and im using xml for some operations.... i have the following problem when try to validate a xml SAXParser parser = new SAXParser(); parser.setFeature("http://xml.org/sax/features/validation",  true); parser.setFeatu