Javascript in a Form

I am trying to create an iCalendar event within a form I have created using data I have within the form to create the calendar event.  I have used this same routine in an html template and it works great.  I would like to make it work within my pdf form as well... if I can.  Please help.
The <%XXXX%> are the form data information I import from another program, which will need to be updated to values from within the form that this script will be in.
Here is my origninal html code:
<script type="text/javascript">
// JScript for Calendar Entry Routine
var fso = new ActiveXObject("Scripting.FileSystemObject");
var a = fso.CreateTextFile("c:\\CompletionDueDate.ics", true);
// Calc start date and end date; then convert each to YYYYMMDD format
// Notes:
// - An end date that is exactly 1 day later than the start date iCalendar, creates an all-day event
// - Months are returned by getMonth() as 0 through 11, so we need to add 1 to get the right month number
// - Appending a z on the end of the time indicates UTC (also known as Grenwich Mean Time)
var date_s_obj = addDays(completion_date, 365);
var date_s_str = getYYYYMMDD(date_s_obj);
// The following can be used as the end date if you want to create an all-day event
// var date_e_obj = addDays(date_s_obj, 1);
// var date_e_str = getYYYYMMDD(date_e_obj);
a.WriteLine("BEGIN:VCALENDAR");
a.WriteLine("PRODID:-//hacksw/handcal//NONSGML v1.0//EN");
a.WriteLine("BEGIN:VEVENT");
a.WriteLine("DTSTART;VALUE=DATE:" + date_s_str + "T08000000");
a.WriteLine("DTEND;VALUE=DATE:" + date_s_str + "T09000000");
a.WriteLine("SUMMARY:<%TASProjectNo%> <%ProjectName%>");
a.WriteLine("DESCRIPTION:Mail Project Folder to TDLR it has been 1 year beyond the estimated completion date for this project.");
a.WriteLine("LOCATION:<%ProjectBuildingFacilityName%>, <%ProjectAddress%>, <%ProjectCity%> <%ProjectZip%>");
a.WriteLine("BEGIN:VALARM");
a.WriteLine("TRIGGER:-PT5M");
a.WriteLine("ACTION:DISPLAY");
a.WriteLine("DESCRIPTION:Reminder");
a.WriteLine("END:VALARM");
a.WriteLine("END:VEVENT");
a.WriteLine("END:VCALENDAR");
a.Close();
document.write('<div class="dontprint">');
document.write('<a href="c:\\CompletionDueDate.ics">Click Here To Add 1 year beyond estimated completion Date to Your Calendar</a>');
document.write('</div>');
</script>

I think you may be in the wrong place. Acrobat JavaScript is a completely different thing than browser JavaScript.

Similar Messages

  • Spry Validations not working javascript:Spry.Widget.Form.destroyAll() in popup

    iam using spry to validate controls in a popup.in that
    validations are working fine but the problem is when we click
    cancel button also thse validations are firing...
    i am using
    javascript:Spry.Widget.Form.destroyAll() to destroy
    validations...but it is not working.
    when we click on cancel button how to destroy the validations
    as well as hide the popup...
    can anyone help me...

    Thanks! (While I'm REALLY not comfortable with code yet (working on it :-) I atleast understood that it was a PHP issue (yay).
    Studied the code in the examples in the book. And added:
    <pre>
    <?php if ($_POST) {print_r($_POST);} ?>
    </pre>
    It worked.  (I'm local testing, with no connection to a database yet. Just trying to get the basic pages to work first.)
    Hopefully the more I work on all of this, the more I'll begin to "get it"! And I'm almost up to the Chapter on PHP. So, I'm hoping to will become clearer as I read on.
    Thanks for the help in pointing me in the right direction!!!
    -- Jami

  • Adobe Javascript in PDF Form for replacing special character

    How to replace special character "/"  in to "\" in the text field of PDF Form by using Adobe Javascript.

    In PDF Form java script,  returns the file path with "/" forward slash, but need to get default in "\" backward slash in the file path.

  • JavaScript in Adobe Form

    Hi Dear All,
    I have a LiveCycle Form i want to use JavaScript in this form, but 1st of all i want to tell you that i don't know about JavaScript kindly help me to complete this form. Sample file is attached kindly check it and help to complete this form.
    Tufail

    Hi Paul,
    I'm really thanksful to your for your help, but i'm un-able to download this form. Kindly if possible send it to in my e-mail "[email protected]"
    Waiting for your response.
    Tufail

  • Javascript in Adobe forms

    Hi All,
    How do we write Javascript in adobe forms to display a text at the end of the master page. this master page count varies based on the number of records in the table. So suppose at the last page I want to display a text. How do we achieve that??
    Thanks,
    Komal

    Master Page will be displayed on every normal page .
    So the alternate solution is make your pages as flow layout. Arrange the things properly.
    After the table or at the end of all the elements you can make a text field for the number of records.
    So as soon as the table is filled the elements are scrolled down and automatically at the end of the page the text field with number of records will be shown.
    Thanks,
    Sumeet

  • Javascript for email form - where in the source code editor does it go?

    Hi,
    I've copied some javascript that I thought would allow me to create a form to collect email addresses, but when I paste the code below between the head or body tags and preview the page nothing happens. Any help would be most appreciated.
    script language="JavaScript" type="text/javascript" charset="utf-8" src="https://promo-manager.server-secure.com/em/forms/subscribe.php?db=3216
    5&s=2796&u=18630&k=74bb649&emb=1"/script
    I've removed some of the < > as they hid the code from the post.
    Thanks
    Charlie

    The code is a bit strange....  Try this -<br /><br /><script type="text/javascript" <br />src="https://promo-manager.server-secure.com/em/forms/subscribe.php?db=32165&s=2796&u=1 8630&k=74bb649&emb=1"</script><br /><br />What is it you are expecting this script to do for you?  And do you have a <br />link to the site where you got this script?<br /><br /><br />-- <br />Murray

  • Javascript problem for form created in Adobe Designer 8.2

    I have redesigned the form using Adobe LiveCycle Designer 8.2 and tried to do merging of xml values into the form. But not successful. Below is sample of the javascript
    trustedImportXFAData = app.trustedFunction (
    function (xmlfilenamename)
    app.beginPriv();
    var re =".pdf";
    var filename = this.path;
    this.importXFAData(xmlfilenamename);
    this.saveAs(filename);
    this.closeDoc();
    app.endPriv();
    This code works find with form created in previous version but not in the new version. I believe it has something to do with the privilege but I do know where I should change.
    For you information, I don't get any error from javascript.
    Thank you

    Hi Paul Guerette,
    I just remembered. I better inform you this as well so you can see the real picture.
    Desktop - OS / Vista Home
    I created the PDF form using Acrobat Livecycle ES 8.2, Then I opened the form in Acrobat Professional 9.0 to enable the save features. Then I open in Reader 9 to make I will be able to save data. Successful
    Laptop - OS / XP Professional
    I have vb.net that calls the js passing xml as parameter.
    jsCode = "trustedImportXFAData(""" + SOURCE_XML + """);"
    Fields = formApp.Fields
    Fields.ExecuteThisJavaScript(jsCode)
    In this machine I have Adobe Acrobat 7.0 Professional. The javascript is inside the \Acrobat 7.0\Acrobat\Javascript\.
    I wonder could this also be, because of the compatibility between 2 different versions.
    Thank you

  • Javascript to save form in Acrobat X Pro

    I have developed a return authorization form using the form function in Acrobat X Pro.  I would like to insert a "save" button into the form that would save the pdf form into a specific folder using the number field in the form as the file name.  I'm not much of a javascript programmer but wondering if anybody has done anything like this or is this possible?  If so, any guidance would be appreciated.
    Thanks in advance,
    Peter

    The location for application folder level scripts was changed with Acrobat/Reader 10.0.1.1 update.
    You may need to use the "app.getPath" method to locate the exact location for your scriipts or verify the location.

  • Information about javascript in pdf forms

    Hello folks. Could anybody tell me where i can find information about application javascript language in pdf forms? I've visited adobe.com and found a lot of pdf articles but they are really useless. I want to find about object model of pdf form, about frequent used operators.

    Hi Konstantin,
    I think this could help you:
    LiveCycle Designer Scripting Basics http://www.adobe.com/devnet/livecycle/articles/lc_designer_scripting_basics/lc_designer_scripting_basics.pdf
    Adobe XML Form Object Model Reference: http://www.adobe.com/devnet/livecycle/articles/Adobe_XML_Form_Object_Model_Reference.pdf
    Michal

  • How to remove javascript from a form?

    Because some users have javascript disabled in their Acrobat readers I’d like to remove all javascript from a pdf-form I have so that the users with js disable don’t get the dialog every time opening a file. As far as I know there’s no need for javascript on the page. How do I disable or remove js from a pdf-form in Adobe Livecycle Designer ES 8.2 ? Thanks!

    Thanks Paul! I had not noticed that there was more to the script editor than met the eye (the resize thing) Here is a picture of what I found.
    I followed your instructions and deleted the lines with line numbers. Now when I saved and re-opened the document my “Events with Scripts” view is completely empty. Still when I open the document in Reader it says “This document contains JavaScripts. Do you want to enable JavaScripts from now on? The document may not behave correctly if they’re disabled”.
    Any ideas what to do? When I select “Show all events” there’s a lot of lines with (JavaScript, client) after them.. could this have something to do with it?
    - Janne

  • How to use Javascript in oracle forms

    Hello Experts,               I am new in Oracle forms using weblogic 10.3.5 with oracle forms 11g at windows 7.I have need to run a javascript code block inside my oracle form.Please suggest me that how can i do this.Actually I have need to validate my item field alike for email address for this I have to use Java script code. thank You regrads aaditya.

    Hi
    As Francois pointed out Oracle forms has nothing to do with html based technology. The way you can get the equivalent effect of creating consistancy in the way your objects are displayed is by creating a set of items you want and alter their apperance and behaviour and place them into object libraries (one library should do the trick).  From there you subclass all of you forms items off these libraries.
    Regards
    Quintin

  • Use of JavaScript in Adobe Forms

    Hi guru's...
    Are there any restrictions in the use of JavaScript Coding within Livecycle Designer?
    Which objects, methods and/or functions can be used and which can't?
    Is there a reference guide for this?
    And is there a way to use some kind of debugging for testing the JavaScript code within an Adobe Form?
    Thanks in advance
    Wouter Heuvelmans
    SABIC Europe SAP Competence Center

    Hi,
    You can learn JavaScript(use it as reference) from this site...
    <i><b>http://www.w3schools.com/</b></i>
    And coming to restrictions...I dont find as such any till now in my usage...
    I used to use ALERTS for DEBUGGING purpose...
    Here is some sample coding...
        <i>var strText = "Raja";
        alert("Hello Javacript"+strText);</i>
    Regards,
    <i><b>Raja Sekhar</b></i>

  • Javascript:  Open a Form

    Hi There,
    I really need some hep with this. I have spent quite a bit of
    time on it already and have scoured the forums.
    I am using v1.
    I am trying to open a form at the end of a movie so I can ask
    a couple of questions and have the results emailed. I know that
    Captivate has the quiz/survey, but the resulting email is ugly and
    my users are not happy with that. I have this working outside of
    Captivate, but I am having trouble getting Captivate to run this.
    within the Captivate .htm file I have:
    <!-- saved from url=(0013)about:internet -->
    <!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>nypro fsa</title>
    <script type="text/javascript">
    <!-- Begin
    var gstrEmailTo = "";
    var gstrEmailSubject = "";
    var gstrEmailBody = "";
    var myVar = 0;
    function openform(){
    document.write("I am in the function")
    formwindow=window.open('fsafeedbackform.html','formwin',
    'width=500, height=400')
    openform is the function I have created. I have another html
    file that contains just the form (fsafeedbackform.html) it is in
    the same directory.
    On the last slide I have a click box that when clicked has
    the command-> javascript:openform();
    However when I run the .htm on my website it doesn't run any
    of the slides. I don't even see the "I am in the function" comment.
    Can someone please help!!!!

    Your example is a little confusing as the form seems to be in
    the same file as the .swf, but you're opening a different page in
    new window?
    Also, can you clarify what you mean when you say "when I run
    the .htm on my website it doesn't run any of the slides"? Are you
    saying the Captivate movie itself doesn't run?
    If so, make sure you have the browser set to notify you of
    scripting errors (in IE, it's Tools | Internet Options | Advanced |
    Display a notification about every script error). You may have a
    JavaScript error somewhere that's breaking the page as it
    loads.

  • Planning javascript in data forms

    Hi. I've customized a Hyperion Planning data form with javascript and I need to get a membername from a Page dimension. I see where I can query row and column membernames but can I get the page membername and store it in a variable in the javascript?
    Thanks.

    anybody? thanks in advance

  • Adding javascript to Print Form button

    Using the Script Editor, can I convert this javascript so that it will fire on MouseUp on the Print Form button? The Designer file is attached for reference.
    newDocName = "";
    f1 = this.getField("topmostSubform[0].Page1[0].Last_Name[0]").valueAsString;
    if (f1!="") newDocName += f1 + " ";
    f2 = this.getField("topmostSubform[0].Page1[0].First_Name[0]").valueAsString;
    if (f2!="") newDocName += f2 + " ";
    f3 = this.getField("topmostSubform[0].Page1[0].Date[0]").valueAsString;
    if (f3!="") newDocName += f3 + " ";
    f4 = this.getField("topmostSubform[0].Page1[0].Email[0]").valueAsString;
    if (f4!="") newDocName += f4;
    newDocName = newDocName.replace(/[\\,\/,\:,\*,\?,\",\<,\>,\|,\,,\n,\r]/g,"");
    docPath = this.path+"";
    docPath = docPath.substring(0, docPath.lastIndexOf("/")+1);
    mySaveAs(this,docPath+newDocName+".pdf");

    Hi penny, I did figure it out actually or more so Wazala technical support figured it out. Email them as the answer might be slightly different depending on your circumstances.

Maybe you are looking for

  • Unable to communicate with product message when installing laserjet cp1525nw printer

    I have a cp1525nw wireless printer that use to work fine wirelessly.  I changed my router password (linksys router) and now can't connect.  I have tried changing the password back to the original password and it still will not connect.  So I when bac

  • Error while starting agent.

    Hi, Config : ODI 11g I have created a standalone agent to run my scenarios. I have set all the required configuration in odiparams.bat file( like Master repository related deatails ,work repository details etc). I am starting that agent by executing

  • E1 8.12 Supplier Split Percentages,  Supplier Relationship Management,  VMI

    Three things: #1 We are trying to locate E1 users, version 8.10 or higher, that have figured out how to split demand between two or more suppliers without using the out-of-the-box supplier split percentage / supplier release scheduling functionality.

  • Issue with Treasury Data Source - 0CFM_DELTA_POSITIONS

    Hi all, I'm trying to use data sources 0CFM_INIT_POSITIONS & 0CFM_DELTA_POSITIONS to load treasury data. Through INIT data source the data has been initialized and loaded the history data to BW from R/3. I'm able to see the entry in time stamp table

  • Why is it not by the same artist?

    Hi, I have album that is not by it's same artists' name.  It is by another artist, I tried to change it to order the albums by artist and year. SNSD: Girls Generation then it's by Sistar not by the rest of SNSD.