Simple Javascript to set date

Hello,
My simple JavaScript to set the date runs in Acrobat Pro but when I open the same document in reader it set the date but it fails with a dialog pop out of getField error... here is the script followed by the error...
function populate_date()
var f = this.getField("ToDay_Date");
if (!f.value) f.value = util.printd ("m/d/yyyy", new Date());
populate_date(); // call my function
Above scripts run when document is opened... In Pro it is stored under Tools/JavaScripts/Document JavaScript...
When I open it in Reader then I get the following while it set the date on the date filed too!
Acrobat EScript Built-in Functions Version 11.0
Acrobat SOAP 11.0
TypeError: this.getField is not a function
2:Folder-Level:App:Search Script.js
What am I not setting right that I get this error...
Regards,
Jeff P.

Hi,
No it did not do and did not help still same error came out... Let me ask you this... this is a combination of 6 pages of 5-6 forms that this field of "ToDay_Date" is repeated at least 4 times on 4 pages of this combined form and it really populates all the repeated "Today_Date" on all pages in PDF Pro and  Reader but while it does not pop up the error dialog on PDF Pro and runs with no problem but in Reader it pup up the error dialog even after populating all the repeated fields!  Could it be because field has been repeated?  How come it runs and populates all the fields but also gives the error?  I think it is a bug in Reader... don't you think so?
Regards,
Jeff P.

Similar Messages

  • HT5706 I have not used my apple tv in a few years, and just got it out of the bag. I connected it up, and it cannot set date, time.  it also does not interact with the remote.  Could it be as simple as a new batter is needed for remote?

    I have not used my Apple TV in a few years, and just got it out of the bag to use on a new TV.  I connected it up to power and with an HDMI cable toTV.  It attempts to set date and time and cannot.  I cannot get the remote to interact with the box also.  Could it be something as simple as needing a new battery?

    Hi kybriar,
    Thanks for using Apple Support Communities.  This article has steps you can take to troubleshoot the remote itself:
    Troubleshooting the Apple Remote
    http://support.apple.com/kb/ht1722
    For the issue of setting the date and time, these articles may help:
    Apple TV: Basic troubleshooting
    http://support.apple.com/kb/ht1551
    Reset Apple TV by unplugging it from the power outlet, waiting about five seconds, then plugging it in again.
    Power off your TV, wait five seconds, then power it back on.
    Apple TV (2nd and 3rd generation): Troubleshooting Wi-Fi networks and connectionshttp://support.apple.com/kb/TS4546
    Ensure that Apple TV is within range of your Wi-Fi router or base station.
    Confirm that your Wi-Fi router and cable/DSL modem are connected to power and turned on.
    Make sure other devices (computers, iPhone, iPad, for example) are able to connect to the Wi-Fi network and access the Internet.
    Check your Wi-Fi network settings on Apple TV:
    Select Settings > General > Network > Wi-Fi and press the center button on the remote to display nearby networks.
    Choose your Wi-Fi network from the list.
    If your Wi-Fi network uses a password, make sure you are entering it correctly.
    Restart your Apple TV by selecting Settings > General > Restart.
    Try restarting your Wi-Fi router or modem by turning it off and then on again.
    If possible, connect an Ethernet cable and verify your Internet connection. If you can connect to the Internet using an Ethernet connection, verify that your Apple TV is using the latest software by selecting Settings > General > Software Update. If your Apple TV can be updated, install the update and then try the steps again.
    Cheers,
    - Ari

  • How to apply a simple javascript into JSF

    Hi everyone. This is my first time using JSF and i am abit confuse in applying some simple javascript into my JSF. Actually, i just want to add a simple function that is to disable user from input some certain textfield (h:inputText) based on the selection in the combo box (h:selectOneMenu).
    The javascipt that i would like to apply in the JSF coding is shown as below:-
    <HTML>
    <TITLE>Example of onChange Event Handler</TITLE>
    <HEAD>
    <SCRIPT LANGUAGE="JavaScript">
    function textField()
    if(document.myform.mcDonald.value=="disable")
    document.myform.data.disabled=true;
    if(document.myform.mcDonald.value=="enable")
    document.myform.data.disabled=false;
    </SCRIPT>
    </HEAD>
    <BODY>
    <H3>Example of onChange Event Handler</H3>
    <form name="myform">
    <SELECT NAME="mcDonald" onChange="textField()">
    <OPTION VALUE="enable">Enable
    <OPTION VALUE="disable">Disable
    </SELECT>
    <input type="text" name="data" value="10" size=10 disabled="true" >
    </form>
    </BODY>
    </HTML>

    You need to use the id's of the components in the hierarchy. This is actual working code:
    // Javascript
              function actionedStatus_onchange(formObj, fieldValue) {
                   formObj.elements['foureye:tabExceptions:unresolvedOnly'].disabled = (fieldValue != 'all');
                   formObj.elements['foureye:tabExceptions:unresolvedOnly'].checked = (fieldValue == 'all');
    // JSF
                   <x:selectOneMenu id="actionedStatus" styleClass="detailBondField" value="#{exceptionsBean.actionedStatus}"
                             onchange="actionedStatus_onchange(this.form, this.value)">
                        <f:selectItems value="#{lookupBean.actionedStatusList}"/>
                   </x:selectOneMenu>
    In this case, the root component form is 'foureye' (a subview), followed by 'tabExceptions' (a form), followed by a checkbox 'unresolvedOnly' that I want to manipulate. Here I am disabling the checkbox and setting the value dependent on the value of the selectOneMenu

  • Problem overloading "set data" function on Button DataGrid Renderer

    Hi all, I'm hoping this is something simple.
    I have a class that extends mx.controls.Button and implements mx.core.IDataRenderer.  I need to set the button icon whenever the Data property is set from the DataGrid.  My problem is that my overloaded set/get Data function are never called (I've stepped through the code in debug).  Instead the set/get functions in Container.as (Flex 3.4 SDK) get called.
    Here's the basics code:
    exportButtonRenderer.as
    package controls
        import flash.events.Event;
        import flash.events.MouseEvent;
        import mx.controls.Button;   
        import mx.core.IDataRenderer;
        import mx.controls.dataGridClasses.DataGridListData;   
        import mx.controls.listClasses.BaseListData;
        import mx.events.FlexEvent;
        import mx.controls.Alert;
        import model.descriptors.compDescriptor;
        import events.exportClickedEvent;   
        public class exportButtonRenderer extends Button implements IDataRenderer   
            //    embed your icons
            [Embed(source='/assets/icons/export.png')]
            [Bindable]
            public static var imageExport:Class;
            [Embed(source='/assets/icons/blank.png')]
            [Bindable]
            public static var imageBlank:Class;
            public function exportButtonRenderer()
                super();
            private var _listData:DataGridListData;
            override public function get listData():BaseListData
                return _listData;
            override public function set listData(value:BaseListData):void
                _listData = DataGridListData(value);
            private var _data:Object;       
            override public function get data():Object
                return _data;
            override public function set data(value:Object):void
                _data = value;
            override protected function clickHandler(event:MouseEvent):void
                super.clickHandler(event);   
    Now I know I'm using the Flexlib TreeGrid and not a standard DataGrid but when I trace through all the code all code firing the set/get functions is coming from the DataGrid anyway.
    Here's the my Grid def in my main app mxml:
    Header 1
    <flexlib:TreeGrid
            id="MKTXGrid"
            dragEnabled="false" sortableColumns="false" showRoot="false"
            disclosureClosedIcon="@Embed(source='/assets/icons/arrow_right.png')"
            disclosureOpenIcon="@Embed(source='/assets/icons/arrow_down.png')"
            folderOpenIcon="@Embed(source='/assets/icons/psd.png')"
            folderClosedIcon="@Embed(source='/assets/icons/psd.png')"       
            click="MKTXGrid_clickHandler(event)"
             doubleClickEnabled="true" doubleClick="MKTXGrid_doubleClickHandler(event)" left="0" right="0" top="0" bottom="16">
        <flexlib:columns>
                <flexlib:TreeGridColumn dataField="Name" headerText = "Name" minWidth="200" width="200" editable="true"/>
                <mx:DataGridColumn dataField="ExportName" headerText = "Export Name"/>
                <mx:DataGridColumn dataField="Export" headerText = "Export" width="50" minWidth="20" resizable="false">
                 <mx:itemRenderer>
                    <mx:Component>
                        <mx:Box horizontalAlign="center" width="100%" verticalScrollPolicy="off" horizontalScrollPolicy="off">
                            <controls:exportButtonRenderer label="Export" icon="@Embed(source='assets/icons/export.png')" width="12" height="12" useHandCursor="true">                        
                                <controls:click>
                                    <![CDATA[
                                        import events.exportClickedEvent;
                                        var e:exportClickedEvent = new exportClickedEvent();
                                        e.itemData = data;
                                        dispatchEvent(e);
                                    ]]>
                                </controls:click>
                            </controls:exportButtonRenderer>
                        </mx:Box>
                    </mx:Component>
                </mx:itemRenderer>
                </mx:DataGridColumn>
            </flexlib:columns>
        </flexlib:TreeGrid>
    Nothing too special going on.
    I know this can be done, I've seen examples in the SDK:
    http://opensource.adobe.com/svn/opensource/durango/trunk/ExternalFlexTools/com/dougmccune/ containers/accordionClasses/AccordionHeader.as
    By the way I've stepped through the code of the TreeGridItemRenderer class in Flexlib which works correctly and the class def starts like this:
    TreeGridItemRenderer.as
    import flash.display.DisplayObject;
    import flash.display.InteractiveObject;
    import flash.display.Shape;
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.geom.Point;
    import flash.geom.Rectangle;
    import flexlib.controls.TreeGrid;
    import mx.controls.Image;
    import mx.controls.dataGridClasses.DataGridListData;
    import mx.controls.listClasses.BaseListData;
    import mx.controls.listClasses.IDropInListItemRenderer;
    import mx.controls.listClasses.IListItemRenderer;
    import mx.core.IDataRenderer;
    import mx.core.IFlexDisplayObject;
    import mx.core.IToolTip;
    import mx.core.SpriteAsset;
    import mx.core.UIComponent;
    import mx.core.UITextField;
    import mx.events.FlexEvent;
    import mx.events.ToolTipEvent;
    import mx.events.TreeEvent;
    import mx.managers.ILayoutManagerClient;
    import mx.styles.IStyleClient;
    public class TreeGridItemRenderer extends UIComponent
                                      implements IDataRenderer,
                                                   IDropInListItemRenderer,
                                                 ILayoutManagerClient,
                                                   IListItemRenderer
    Any help would be great!

    That's because you put your component in a Box.  The DataGrid is setting the Box's .data property and no code is setting the one on your component.  You shouldn't really need Box.  You can override updateDisplayList to center your Button instead.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Set date Mask in Sapscript

    hi all,
    Requirement is to diplay todays date in MM.DD.YYYY format in a smartform layout.
    We have used the command
    /:SET DATE MASK = 'MM.DD.YYYY'
    /:SET COUNTRY 'US'
      &sy-datum&
    But the date appears in the user format DD.MM.YYYY.
    Whys the set date command not working here as expected ?
    Your ideas appreciated.
    Rgds,
    stock

    Hi  Stock Sys,
    Formatting Date Fields: SET DATE MASK
    To define the formatting of date fields, use the SET DATE MASK control command. Executing this command causes all subsequent date fields to be printed using the specified format.
    Syntax:
    /: SET DATE MASK = 'date_mask'
    In the date mask, you can use the following codes:
    DD: day (two digits)
    DDD: day name - abbreviated
    DDDD: day name - written out in full
    MM: month (two digits)
    MMM: month name - abbreviated
    MMMM: month name - written out in full
    YY: year (two digits)
    YYYY: year (four digits)
    LD: day (formatted as for the L option)
    LM: month (formatted as for the L option)
    LY: year (formatted as for the L option)
    All other characters found in a date mask are interpreted as simple text and are copied straight into the output.
    Assuming the current system date is March 1st, 1997.
    /: SET DATE MASK = 'Foster City, MM/DD/YY'
    &DATE& -> Foster City, 03/01/97
    /: SET DATE MASK = 'MMMM DD, YYYY'
    &DATE& -> March 01, 1997
    The date mask may be reset to the default setting by using an empty string:
    /: SET DATE MASK = ' '
    The abbreviated and full forms of the names of the days and months are stored in the language dependent TTDTG table under the following keys:
    %%SAPSCRIPT_DDD_dd: abbreviated day name
    %%SAPSCRIPT_DDDD_dd: full form of day name
    %%SAPSCRIPT_MMM_mm: abbreviated month name
    %%SAPSCRIPT_MMMM_mm: full form of month name
    dd: day number 01 = Monday,..., 07 = Sunday
    mm: month number 01 = January,..., 12 = December
    Regards.
    Eshwar.

  • AccessViolationException occurs while setting data source to a datatable

    Dear All,
    I have recently encountered problem while generating Crystal Report (version 11.5) in my VB.NET project and see if you can help to provide a solution for that. In particular, the following access violation exception occurs when setting data source of a report object to a datatable:
    "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
    Then if i press F10 to step over in VS2008, the exception won't occur again and the report can be printed successfully with data from datatable. So it does not fail all the time but only the first time...
    My code is rather simple and it looks something like this where ds is declared as a dataset filled with data:
    Dim crApp As CRAXDDRT.Application
    Dim crRpt As CRAXDDRT.Report
    crApp = New CRAXDDRT.Application
    crRpt = New CRAXDDRT.Report
    crRpt = crApp.OpenReport("C:\some.rpt")
    crRpt.DisplayProgressDialog = False
    crRpt.DiscardSavedData()
    crRpt.Database.Tables(1).SetDataSource(ds.Tables(0), 3)  <--- exception occurs at this line
    crRpt.PrintOut(False)
    Also, from the exception details, the problem appears to be thrown from the driver crdb_adoplus.dll which I have installed the latest version (11.5.11.1470) with CR XI R2 SP5.
    Kindly reply if you know what's going on... Thx!
    Stephen

    Hi Stephen,
    As I said, craxddrt, embeddable designer control, is not for your use other than designing reports within the .NET IDE. You CAN NOT distribute this dll and it's dependencies. You are NOT licensed to use use it in a runtime application.
    As you say it may possibly work but it is not supported other than designing reports in the IDE and again you are NOT licensed to distribute it.
    Next issue is the RDC ( Either craxdrt.dll or craxddrt.dll ) in version XI R2 ( 11.5 ) is still supported but again only supported in Visual Basic 6. The RDC is COM and was never designed to work in .NET.
    COM and .NET are two completely separate code streams, there is no direct convert from the RDC to .NET. Same functional API's but completely different way of implimenting them.
    For more info on how to use and for sample applications click on this link:
    http://www.sdn.sap.com/irj/boc/samples?rid=/webcontent/uuid/80774579-b086-2b10-db91-ed58c4dda375 [original link is broken]
    So even though it may be partially working there is no point in continuing this post concerning the RDC, it's simply not supported for what you are doing and you are not licensed to deploy it.
    Thanks again
    Don

  • How to set data in rtf document?

    Hi friends,
    I have a rtf document can anyone suggest how to set data in cells of an rtf document?Is there any way?
    Thanks in advance..
    Regards ,
    Soumyanil

    Convert the resultSet from the db to a Object[][], let's call it result.
    Then create a JTable (jTable1).
    On the JTable you need to define the headers, and the data itself.
    You can get the headers from ResultSetMetaData. Convert these to an array again (headers).
    Now use these methods to create a model and set the model of the JTable.
    Model model =  new DefaultTableModel(result, headers);
    jTable1.setModel(model);That's about the basics.
    If you need more info, use at the tutorial at sun's homepage.
    How to use Tables:
    http://java.sun.com/docs/books/tutorial/uiswing/components/table.html

  • Dynamically Set date not changing in schedule Job

    Hi,
    I have created a report with "Order Date" as one of the parameters on the selection screen. I have created a variant, say 'X' , to set this date parameter dynamiccaly as "Current date - 31 days".
    I have scheduled this program to run in background with the 'X' variant daily at certain time.
    Now, for the day on which I created this job , the Order Date is set to correct date . For ex if I am scheduling the job tdy it will be set to 06/10/08. However, for next day , that is tom this date is not getting changed. i.e Tommorrow again Order date is 06/10/08 but it should have been 07/10/08.
    So basically this dynamically set date is not chaning in the scheduled job.
    Any idea why this is happening and what is the corrective measure for this.
    Thanks!

    There is an INITIALIZATION event in the program.......
    Do the processing your date in that event only....
    for ex....
    select-options: date for order-date.
    INITIALIZATION.
    date-low = sy-datum or wat ever.
    Thanks
    Saurabh

  • How do I set date and time on apple tv?

    How do I set date and time on apple tv?

    Fixed the same problem, STEPS
    1. Reset your apple TV
    2.It will again stuck on that setting, ignore it by press menu
    3. Unplug ethernet wire
    4. Try to connect with wifi, it should be work with wifi connection as mine.
    5. Then you can switch back Ethernet wire after get fixed.
    Thanks. Lemme know dude if it's work.

  • Programati​cally set date of picktime.v​i

    I am using the picktime.vi calendar as a subpanel (yes...i am aware there is an activex calendar -- using it is not an option right now). Anyways, what I want to do is if a user wants to edit a record that was on the date  1/1/11 but currently the date selected in the calendar is 2/2/11, I want to programmatically set the date back to 1/1/11. I can use value signaling properties to set the month and year, but because the date is a MC listbox controlled in the VI only through mouse up/keyup events I am not sure how to set this. Does anyone have any ideas?
    One thought I have is to add a state to the VI called set date, but I'm trying not to modify it since it is native to LabVIEW and is called when the calendar icon is pressed next to a timestamp control. I could make a copy of this VI and do that, but again, I'm trying to avoid this.
    Suggestions?
    The picktime.vi is located in <LabVIEW Dir>\resource\dialog
    CLA, LabVIEW Versions 2010-2013

    Thanks for the response, but no this is not exactly what I want. I don't want to actually change the date of the computer, I just want to set the date the calendar has selected to some other date. The computers date/time is only used on initialization of the VI or when the user pressed the "now" boolean.
    Think of it this way --
    I select 1/24/11 on the calendar and add a record for that date, which puts an entry in a MC listbox
    I then select 1/22/11 on the calendar and add a record for that date which puts another entry in a MC listbox
    So, now the calendar shows 1/22/11 highlighted
    Then I say, oops, the record I entered for 1/24/11 has a typo, so I select that record in the MC listbox and press edit to make the change
    The calendar should then be set back to highlighting January, 24 2011.
    CLA, LabVIEW Versions 2010-2013

  • How to set Data Subsetting Parameters in MOBILE SERVER

    Hello.
    How can I set data subsetting parameters in Mobile Server with patch 5.0.2.10.0 NLS.
    From Mobile Server "Control Center" -> "Applications" it's not appears at left screen the following field:
    * Data Subsetting
    * Registry
    * Access
    * Files
    The browser appears this error message:
    "http://120.0.0.1:2000/webtogo/admin/console/apppropinfo?applicationvp=%2FMyApp"
    Have you any idea for this problem?
    Thanks All.

    Thanks Oliver,
    I have to go in control center in "applications tab" then i have the list of application and i edit one of them, on the left clic Data Subsetting it's not appears.
    The following it not appears:
    * Data Subsetting
    * Registry
    * Access
    * Files
    The browser (internet explorer) appears (at buttom on the left browser) this error message:
    "error http://127.0.0.1:2000/webtogo/admin/console/apppropinfo?applicationvp=%2FMyApp missing link".
    Whereas (Oliver's solution) in Mobile Server "Control Center" -> "Users Tabs"
    i have the list of users go and i edit one of them, on the left clic Data Subsetting then clic on the right pan platform and then i see but not parameter are definited.
    Help me please.

  • In base component when user change the serial number we need to set date time in Extra attribute filed

    HI Team,
    In ibase component when user change the serial number we need to set date time in Extra attribute filed..if we click edit ,User change serial number after save we need to set date time in  Extra Attribute 4 field .
    Component - PRDGENSET
    In this component there is no attributes,so where we need to implement and how to implement please help.
    Thanks
    kalpana

    Hi Abi,
    Thanks for your reply..see i debugged..i have put break point in method SET_S_STRUCT method if press enter in serial number ,debuggeris triggered..in SET_S_STRUCT method value getting serial number..so how to write the logic here...
    In GET_S_STRUCT method iam getting all attributes  but serial number is not filled..So could you please help here what to do..
    in set_S_STRCUT method value iam gettin serial number...in collection wrapper iam geting zrealtions if i open attributes_ref -if i pass Attribute value in run time its getting displayed.so how to write the logic based on serial  number please help some coding.
    Thanks
    kalpana

  • Using javascript to set relative position of popup

    I currently use the code below to pop up a window. BUt based on different screen resolutions it might not appear where it should be on all monitors. I always want it to the top right. If there a way to do this with javascript. Setting the top/right pixels wont always work, i dont think so anyhow.
    Thanks in advance.
    <script>
    function MDM_openWindow(theURL,winName,features)
    var _W=window.open(theURL,winName,features);
         _W.focus();
    _W.moveTo(750,25);
    </script>
    Click here

    hi....use this to get screen res...then you can use a percantage instead of pixels to place the pop-up...it shows method and height methods to get user resolution...
    <script language="JavaScript">
    var browserheight;
    var iMyHeight;
              var iMyWidth;
    //Gets user's resolution
    iMyHeight = (window.screen.height);
              iMyWidth = (window.screen.width);
    </script>
    hope this helps / steve

  • Setting date and time in java mail

    I want to set date and time for the mail sent by my application.
    So how to set date and time for my mail.

              msg.setSentDate(new Date());Where msg is an instance of javax.mail.Message.

  • "RT Set date and time" does not set seconds in UTC mode

    Hallo,
    I tried to set the time on my cRio 9012 with the function settimeUTC which is used by the "Set Date and Time" vi. But the seconds I enter are ADDED to the current time and not set as new value.
    Even the vi shows this behaviour: I set up a vi in which the time is set in a loop (100ms delay) and read again. When I set local time the clock stops (as expected) but when I set the UTC time the seconds keep on running...
    Can anybody help me with that problem???
    Thanks
    Florian
    Solved!
    Go to Solution.

    Hi Andreas,
    well it does not matter if I set a time zone in the MAX or not. In my example I was working on UTC + 0 but even when I set it to my local time (UTC + 1) I get the same behaviour modified by one hour.
    My LabView Version is 8.5. In in the MAX under Software-> LabView-RealTime it says that I am using 8.5.0.
    I suspect  that the settime.out which is installed on the cRio is probably the root of the problem as VxWorks itself does not offer a function (at least I did not find one) to convert from broken down system time to system time in seconds. There only exist one to convert from broken down local time to system time in seconds ( mktime() ). The reverse function is available for both cases: gmtime() and localtime(). I also did not find a way to find out the offset of the local time. So I have to use the library function settimeUTC() from settime.out.
    As I offered I can send you the settime.out file from my cRio for reference or maybe you can tell me how to find out what the version of the file is. It seems not to be an ELF file as I looked inside it to find some timestamp or version info...
    Thanks so far 
    Florian

Maybe you are looking for

  • What is the best database alternative?

    I am collecting data (alarm & counter) from several serial devices which have memory and RTC.  Therefore I have to take into account that the collected data will not be chronological and I may need to sum newly collected data to existing records and

  • Can I run window 8.1 pro on hp a450n

    Can I run window 8.1 pro on hp a450n with upgrade 2gb ram.

  • Two versions of flash and security questions

    If i have flash player v11 and v13 both installed with Firefox on a win 7 64bit platform.. will the latest version out of the two always be the one used? or is it possible a website could request the older version with security flaws exposing securit

  • I just upgraded to version 7.0 ... iTunes is working fine BUT

    my Volume Logic plugin that has worked just fine all along with prior versions of iTunes has now quit working. I'm on lated version (1.3) of Volume Logic for iTunes for Windows. Has anyone else experienced this? I already tried to re-install Volume L

  • Impact on ICM restart

    Hi, We wish to restart the ICM (either soft or hard) and would like to take some tips if there wud be any impact on live communication channels during the ICM restart? regards Prabhu