Definng and calling javascript on apex 4.2 (New on Apex)

Hi.
can anyone tell me where do i create a javascript on apex 4.2 ? so i can call it from various pages.
thanks

I suggest create a javascript (.js) file with all your functions and upload it through the shared components > static files and refer the javascript in javascript URL reference in page attributes. The code will be something like <script language="javascript" src="#APP_IMAGES#javascript file" /> or #WORKSPACE_IMAGES#.

Similar Messages

  • Updated Acrobat and now Javascript calculations not working in new forms.

    I had created forms for my work that allowed me to calculate back dates from a given date to instruct the form users when components of a project were due. Below is the script I used- I am NOT a programmer and this was taken from another forum. It has worked successfully for 2 years in both Acrobat 9 & 10 and in various forms I have made.
    var strStart = this.getField("0VendorArtApproved-2wk").value;
    if(strStart.length)
      var dateStart = util.scand("mmm d, yyyy",strStart);
      var oneDay = 24 * 60 * 60 * 1000;
      var dueMillis = dateStart.getTime() - 21 * oneDay;
      var dueDate = new Date(dueMillis);
      event.value = util.printd("mmm d, yyyy",dueDate);
    else
      event.value = "NA";
    "0VendorArtApproved-2wk" is the field the previous date was taken from- this and the amount of days "- 21" changes from field to field. This form has 3 levels that it calulates dates from- which starts with a single initial date entered into a text box by the user. This allowed the user to see when different elements of a project were due. Sorry if this seems basic to all the Javascript masters but I am really very clueless on prgramming speak and only know what I have read from forums.
    The last version of the form that worked successfully was in Oct 13', I went to create a new form and copied these formula boxes to a new form and now half of them do no work.
    I have rechecked my formulas and formatting and cannot find and issue. They are exactly the same. One works and one does not. The only thing I can see different from the 2 forms is that I am certain there were 1 or 2 updates to the Acrobat software itself that could possibly have caused an issue.
    So I have 2 documents- 1 created in October 13' that works and one created today Jan 14' that does not work. They have the same formulas.
    Anyone aware of changes to Acrobat or errors in my formula that could have caused this? I am in version 10.1.9

    Applied this fix. There was an error in the NEW document. I redid the formulas in the NEW document and that did not work. Still had the same problem. 
    SO I went back and redid the formulas in the fields in the OLD document to the revision I needed and that worked. All I was trying to do was tweak the number of days between one element and the next in this area and there were a bunch of other revisions to the form so I figured it was easier to start fresh.  I will just make all the revisions to the OLD document- which will be a lot of work, but at least my formulas are working. Not an ideal fix but something must have been glitchy in the new document and I now have a workable form.
    I believe some kind of odd interaction happened when I copy and pasted the fields from document to another.
    Thank you so much for your help! I am days away from maternity leave so I had to get this figured out fast!

  • Click-box behavior and calling javascript

    Greetings,
    While working on a project I have noticed odd behavior
    concerning click-box behavior where there are more than one
    click-box on a slide.
    Here is the situation:
    I have a Captivate (2) lesson project. In several slides I
    have an area on the slide where the user can access material
    outside the lesson. They do this via clicking a click-box. The
    click-box is set to fire a javascript that opens the additional
    content (an outside url) in window that "floats" above the
    currently viewed slide.
    The javascript is a standard open browser window script with
    passed parameters.
    Here is the script being called (it is located in
    standard.js):
    function openBrWindow(theURL,winName,features)
    window.open(theURL,winName,features);
    This script is being called in Captivate in:
    Insert -> Click-box -> If the user clicks inside the
    box, On Success -> Execute Javascript
    An example of a typical call:
    Click box -> JavaScript: -> In the window/field is:
    javascript:openBrWindow('
    http://www.mydomain.com/about/org-pol/f-07/f-07-016.html','mypolicy','width=800,height=600 ,scrollbars=yes');
    This works fine. A window with this URL opens up over the
    stopped slide.
    The odd behavior comes in where I have more than one of these
    click-boxes on a slide. If the user clicks a second click box, the
    correct (different) URL opens up in a window OK, but the slide (now
    behind the new, open window) advances. It shouldn't advance to the
    next slide. It should stay put until a user clicks a particular
    button to advance.
    Has anyone seen this type of behavior before? Is this a bug
    in Captivate 2? Or a bad javascript call? Any thoughts?
    Thank you for your input.
    TPK

    Hi TPK
    When you edit the properties of the Click Box, note that
    there are two buttons to the right of the "JavaScript" field. One
    is an ellipsis ( ... ) and you probably clicked that one to enter
    the script. The other is a down arrow. You need to click the down
    arrow and DE-select the option labeled "Continue playing project".
    You will need to do this for each Click Box the user may interact
    with where you don't want the slide to continue if the user clicks.
    Cheers... Rick

  • Embedding and calling JavaScript from the CS SDK

    Hi, the article about the communicating between JavaScript and the CS SDK is exactly what i was looking for!
    http://cookbooks.adobe.com/post_Communicating_between_JavaScript_and_the_CS_SDK_us-17383.h tml
    Unfortunately I have a problem with the example code. Everytime i try to run the script an error message pops up:
    "Error #1014: Class flash.external::HostObject could not be found."
    Does anyone have a solution for this problem or any idea why this error appears?
    I didnt change the script, i included the apedelta.swc and the link type of the apedelta.swc is external. (I checked it like a hundred times. :-))
    Thanks in advance!
    Joerg

    Unless I am wrong, you cannot debug in Flex once you loaded csaw libraries. I mean, Flex will catch most mxml/as errors but it won't be able to deal with the part interacting with cs apps. At this level, only ExtensionBuilder can.
    To be clear and given the fact you correctly imported the right classes and all needed stuff, this won't work in FB:
    trace (app.activeDocument.name) or whatever cs dom command.
    Hope it helps,
    For what it worth, I created a jsinterface call to alert() so I use it as a trace replacement tool. Once again ExtensionBuilder is far more usefool in this workflow.
    Loic

  • My itunes keeps saying file corrupt this is the third time i ahve tried it and called is it time for a new phone?

    i have called apple support three thimes to fix my iphone software and each time itunes comes up with a file is corrupt message what to do?

    If you purchased AppleCare then give them a call and they can coach you through it. If you have not purchased AppleCare yet I would strongly recommend doing so, this will extend the warranty from 1 to 3 years and also include 3 years of telephone support. You can only buy AppleCare during the first  year of ownership.
    One thing you can try though is navigating to the Applications folder, locate iDVD and try to launch it from there. You can also download the iLife apps using Lion Recovery, OS X Lion: About. If you still don't have any luck book an appointment at your local Apple Store or AASP and take it in.
    It is possible you may run into another issue, Apple ceased including iDVD in iLife in 2011. This can usually be overcome by contacting AppleCare and requesting a copy.

  • Contracts and Call off's

    Hi,
    A customer can create a contract or a bulk order in the system.
    This can be referenced by call off orders.
    One system can have multiple contracts and call off's.
    1 - Are there standard system settings that are considered when a call off is referencing a contract order?
        As in, what are the critera that a call off order will check in order to reference contract A or B.
    2 - Say call off order B is created by referencing contract A.
        I dont want the pricing in contract A  to copy to call off order.
      How can this be facilitated?
    Thanks in advance!

    Hi,
    1 - Are there standard system settings that are considered when a call off is referencing a contract order?
    As in, what are the critera that a call off order will check in order to reference contract A or B.
    Yes when your Call off order is referenced with contract then it will appear in tab ACCOUNT ASSIGNMENT at item level
    after save of call order it will appear in document flow
    When system referring contract then there are various criteria check by system that you can check in COPY CONTROL SALES DOCUMENT TO SALES DOCUMENT by t-code VTAA check at header level and item level what routine are set
    If you set outline agreement massage indicator in call of order by VOV8 under transaction flow tab, then even you not reference contract and individually creating call of order and once you put sold to party system will check is any contract available with this party.
    2 - Say call off order B is created by referencing contract A.
    I don't want the pricing in contract A to copy to call off order.
    How can this be facilitated?
    For this if you want to keep PRICE PROCEDURE same for contract and call of order but only want new price values in call of order then in copy control VTAA at item level set PRICING TYPE - B carry out new pricing
    If you want to assign two diffrent price procedure then differentiate by DOCUMENT PRICE PROCEDURE
    set two different document price procedures in Sales document by VOV8
    and determine two different pricing procedure by OVKK in both documents
    Kapil

  • How to call javascript function from PL/SQL procedure

    Can anybody advice me how to call javascript function from PL/SQL procedure in APEX?

    Hi,
    I have a requirement to call Javascript function inside a After Submit Process.
    clear requirement below:
    1. User selects set of check boxes [ say user want to save 10 files and ticks 10 checkboxes]
    2. user clicks on "save files" button
    3. Inside a After submit process, in a loop, i want to call a javascript function for each of the file user want to save with the filename as a parameter.
    Hope this clarify U.
    Krishna.

  • Calling javascript from a button

    Good morning everyone!
    I need to add a message box that asks the user a confirmation to delete information. So I want my delete button to call the javascript necessary to confirm the delete and then delete.
    My problem is in calling the javascript. I'm able to do so by using an image for my button and in the image attributes add:
    onclick="javascript:confirmDelete('Are you sure you to delete?');"
    This works perfectly, except for one thing: I don't want to use an image for the button. It doesn't fit with the rest of the application.
    I know it can work, because Oracle is using it on this page:
    http://apex.oracle.com/pls/otn/f?p=37719:8:3069181226556730::NO:::
    So how can I call my javascript from an ordinary button?

    I have a related question:
    How can I access the BROWSER_LANGUAGE in javascript? With my method of calling javascript, I didn't find a good way to pass variables to the function that I call.

  • JQuery Mobile and page transitions in Apex - how do they go together?

    Hi guys,
    I started off on a jQuery Mobile project with APEX - although I am still quite new to both. I have done quite a bit of research, but I haven't found really anything substantial about how they go together.
    Rather it appears to me, that both have their own way of dealing, that is to say recieving and sending data. Apex with normal http-requests, just a little AJAX on the side maybe, JQM almost only with AJAX.
    So I am running into a lot of trouble, when I use functions like apex.redirect() or .submit(), the $mobile.changePage() mostly doesnt how I want. Page content often stays in the DOM with JQM unwanted, data are sometimes not refreshed properly, or when I close a popup box, an unwanted reload takes place. Events are not bound the usual way, etc. etc.
    I certainly thoroughly have studied the JQM documentation, looked through many other tutorials and blogs, but basically I still lack in a lot of basic understanding, especially the communication between JQM and APEX - after all, the APEX Smart Phone UI from 4.2 is still quite new. And all tutorials about data management with JQM deal with JSON objects or XML - methods we can't get into due to time reasons.
    I have two questions to the community:
    A) Is it really recommendable to use a JQM framework with the "normal" page-show and page-submit events, that APEX delivers? Or if not recommendable, is it practical?
    B) Maybe some experienced users here can hint me to some recourses that specifically deal with the issues I mentioned above: e.g. How does JQM handle the urls it gets, when you use the APEX javascript functions? What global JQM settings are recommendable when using APEX, or what object-parameters should you use in the $.mobile.changePage() call?
    And one specific problem I just ran into: How does JQM treat Page-0 items? I use them for global application control, but for some strange reasons, they sometimes seem to be resettet.
    So these are a lot of questions, but I don't seek detailed answers here, rather some general guidence and advise. Any help is most appreciated.
    So long, with best regards,
    tobi
    Edited by: TobiP on 14.02.2013 13:41

    I will up this thread one time - what I normally wont do. But if noone can give any hints here this would be a really bad sign.
    I have kept on looking for those topics, but I still haven't found anything that goes into detail regarding APEX and JQM.
    Also one last wierd situation I would like to relate, that just occured: I submit a page with apex.submit('CREATE'), the dml-processing takes place, there is an unconditional branch after the processing back to that page, so it should be reloaded and refreshed - but it doesn't. Instead when I open a select list (JQM popup style), then the page gets refreshed, and the popup wont close anymore. I have no explanation for this. I hope, anyone can give me any hints.
    Thanks very much,
    tobi

  • Call javascript function after submit process

    Hi,
    How can I call javascript function after my submit process ?
    Thanks.

    Hi Carl,
    You say that I must have an Item or region that contains my js with conditionnal display. With this method I can execute my js with specific request value.
    My problem is that I tried to integrate the "save large value workaround" in my application with the APEX wysiwyg (fckeditor). To do that I have to call the javascript function clob_submit on the save button. This function save the value of my field but if I want to save other item value, how can I do that ?
    If I use your method, I will submit the page, save the other field and after that, I will branch on the same page. At this moment, I will execute my javascript file.
    Is it what did you said ?
    Sylvain Michaud
    Homepage : http://www.insum.ca
    InSum Solutions' blog : http://insum-apex.blogspot.com

  • Javascript in apex 4.0.2

    How to incorporate javascript in apex 4.0.2...i mean from where i can add javascript code for any component on the page..
    Any suggestions will be highly appreciated

    You can upload in shared components under Files.
    Then you can reference like:
    <script type="text/javascript" src="#APP_IMAGES#filename.js"></script> or
    <script type="text/javascript" src="#WORKSPACE_IMAGES#filename.js"></script>depending on if you associate it with an app or not (Respecitvely).
    Or upload to the server and then reference as:
    <script type="text/javascript" src="#IMAGE_PREFIX#path/to/filename.js"></script>or simply put in a header region of a region:
    <script type="text/javascript">
    //your code
    </script>Or in the page definition, there is a section specifically to place JavaScript variable and function definitions.
    Or if its common across all pages, you can edit the page template.
    Ta,
    Trent

  • Java Applet call javascript problem

    Hi I have a web page as follow and embedded a applet. The applet call the java script, and instead of showing an alarm, the browser show the javascript code. Is that strange ? Any suggestion for this problem.
    HTML:
    ================================================================
    <HTML>
         <HEAD>
         function ShowEmbd()
              alert("Test Applet call Javascript");
         </SCRIPT>
         </HEAD>
         <BODY>
         <FORM NAME="AppletEmbdStart">
              <OBJECT classid="clsid:48B2DD7B-6B52-4DB0-97C9-ECB940113B47" id="CIVON_DEmbdObj" width="0" height="0"></OBJECT>
              <APPLET code="MyApplet.class" width="0" height="0"></APPLET>
         </FORM>
         </BODY>
    </HTML>MyApplet.java
    =========================================================================
    import netscape.javascript.*;
    public class MyApplet extends javax.swing.JApplet
         private JSObject m_win = null;
         private JSObject m_doc = null;
         public void init()
              getJSWin().call("ShowEmbd", null);
         private getJSDoc()
              if(m_doc == bull)
                   m_doc = (JSObject) getJSWin().getMember("document");
              return m_doc;
         private JSObject getJSWin()
              if (m_win == null)
                   m_win = netscape.javascript.JSObject.getWindow(this);
              return m_win;
    }The page was load and it should call the applet MyApplet. The MyApplet should do the init() method and call the Javascript "ShowEmbd()", BUT, instead of show alert from ShowEmbd(), the browser show the code of ShowEmbd() itself ...... It did not run the javascript and shows the alert ??
    The browser shows a message from status bar "The applet not initial" ???? why ???
    Can anyone help ?!

    On first look:
    I am not sure about the Object Tag, but the Applet Tag requires the MAYSCRIPT attribute before Java can call Javascript.

  • WAD : Call Javascript Function only on Initial Load

    Hi
    I need to replicate the functionality found in the web template parameter ACTION_BEFORE_FIRST_RENDERING in a Javascript function. I need to to do this in order to read a querystring parameter, and then perform actions based on that querystring parameter.
    Is there a way to either call a function from the ACTION_BEFORE_FIRST_RENDERING command, or how do I call my Javascript function only the 1st time the page is loaded?
    I can call the Javascript function from the body onLoad event, but that results in the function being called every time the page loads, which is not what I want ... I only want the function called the 1st time the page is loaded.
    Cheers,
    Andrew

    Seems you can use this parameter to check :
    sapbi_page.m_requestIdValue
    The first time a page is loaded, that value is 1. Thereafter, it increases. I can therefore put that check in my onLoad function, and call the stuff I need if it is 1, otherwise leave the function.
    Cheers,
    Andrew

  • Gregorian to hijri and viceversa javascript

    I have a Javascript for a Hijri / Gregorian calendar.
    I need to get it into Adobe Acrobat PDF.
    The business requirements for this are easy. Just take the script i give you and get it to work in Adobe Acrobat PDF.
    The technical side is tricky. I haven't been able to make it work. When I do it, the conversion works 1 time when you first open the document. then, it only works one way after that. (from gregorian to hijri, never the other way around.)
    1. This MUST be done in Acrobat XI, Not LiveCycle.
    2. I'm using Adobe Acrobat XI Pro. I can't use any other version right now. So this must be able to work on XI and then people need to be able to open and execute this in Reader.
    Here is the code I have written from a HTM file..
    <SCRIPT LANGUAGE="JavaScript">
      function setDateToToday()
        var today = new Date();
        var y = today.getYear();
        var y = today.getYear();
        if (y < 1000) {
            y += 1900;
        document.myform.CYear.value = y;
        document.myform.CMonth.selectedIndex = today.getMonth();
        document.myform.CDay.value = today.getDate();
    // Travis added the following method call to fix the bug where the Hijri date was not set to today by default   
        chrToIsl(0);
    //  LEAP_GREGORIAN  --  Is a given year in the Gregorian calendar a leap year ?
    function leap_gregorian(year)
        return ((year % 4) == 0) &&
                (!(((year % 100) == 0) && ((year % 400) != 0)));
    //  GREGORIAN_TO_JD  --  Determine Julian day number from Gregorian calendar date
    function gregorian_to_jd(year, month, day)
        var GREGORIAN_EPOCH = 1721425.5;
        return (GREGORIAN_EPOCH - 1) +
               (365 * (year - 1)) +
               Math.floor((year - 1) / 4) +
               (-Math.floor((year - 1) / 100)) +
               Math.floor((year - 1) / 400) +
               Math.floor((((367 * month) - 362) / 12) +
               ((month <= 2) ? 0 :
                                   (leap_gregorian(year) ? -1 : -2)
               ) +
               day);
    function mod(a, b)
        return a - (b * Math.floor(a / b));
    function jd_to_gregorian(jd) {
        var wjd, depoch, quadricent, dqc, cent, dcent, quad, dquad,
            yindex, dyindex, year, yearday, leapadj;
        var GREGORIAN_EPOCH = 1721425.5;
        wjd = Math.floor(jd - 0.5) + 0.5;
        depoch = wjd - GREGORIAN_EPOCH;
        quadricent = Math.floor(depoch / 146097);
        dqc = mod(depoch, 146097);
        cent = Math.floor(dqc / 36524);
        dcent = mod(dqc, 36524);
        quad = Math.floor(dcent / 1461);
        dquad = mod(dcent, 1461);
        yindex = Math.floor(dquad / 365);
        year = (quadricent * 400) + (cent * 100) + (quad * 4) + yindex;
        if (!((cent == 4) || (yindex == 4))) {
            year++;
        yearday = wjd - gregorian_to_jd(year, 1, 1);
        leapadj = ((wjd < gregorian_to_jd(year, 3, 1)) ? 0
                      (leap_gregorian(year) ? 1 : 2)
        month = Math.floor((((yearday + leapadj) * 12) + 373) / 367);
        day = (wjd - gregorian_to_jd(year, month, 1)) + 1;
              document.myform.CDay.value = day;
              document.myform.CMonth.value = month;
              document.myform.CYear.value = year;
    function intPart(floatNum){
    if (floatNum< -0.0000001){
               return Math.ceil(floatNum-0.0000001)
    return Math.floor(floatNum+0.0000001)
    function weekDay(wdn){
    // Stubbed this out because we have no interest in showing the days of the week.
      return ""  }
    function chrToIsl(NumberofDays) {
              //alert("Month:" + document.myform.CMonth.value)
              d=parseInt(document.myform.CDay.value)
              m=parseInt(document.myform.CMonth.value)
              y=parseInt(document.myform.CYear.value)
                                                      if ((y>1582)||((y==1582)&&(m>10))||((y==1582)&&(m==10)&&(d>14)))
                                                                jd=intPart((1461*(y+4800+intPart((m-14)/12)))/4)+intPart((3 67*(m-2-12*(intPart((m-14)/12))))/12)-
              intPart( (3* (intPart(  (y+4900+    intPart( (m-14)/12)     )/100)    )   ) /4)+d-32075
                                                                else
                                                                jd = 367*y-intPart((7*(y+5001+intPart((m-9)/7)))/4)+intPart((275*m)/9)+d+1729777
                                                      jd = jd + NumberofDays
                                                      //Stubbed out the weekday/epoch names below to remove them from the HTML page.  jd = epoch time wd = weekday
                                                      //document.myform.JD.value=jd
                                                      //document.myform.wd.value=weekDay(jd%7)
                                                      l=jd-1948440+10632
                                                      n=intPart((l-1)/10631)
                                                      l=l-10631*n+354 
                                                      j=(intPart((10985-l)/5316))*(intPart((50*l)/17719))+(intPart(l/5 670))*(intPart((43*l)/15238))
                                                      l=l-(intPart((30-j)/15))*(intPart((17719*j)/50))-(intPart(j/16)) *(intPart((15238*j)/43))+29
                                                      m=intPart((24*l)/709)
                                                      d=l-intPart((709*m)/24)
                                                      y=30*n+j-30
              jd_to_gregorian(jd)
              document.myform.HDay.value=d
              document.myform.HMonth.value=m
              document.myform.HYear.value=y
    function islToChr( NumberofDays) {
              d=parseInt(document.myform.HDay.value)
              m=parseInt(document.myform.HMonth.value)
              y=parseInt(document.myform.HYear.value)
              jd=intPart((11*y+3)/30)+354*y+30*m-intPart((m-1)/2)+d+1948440-385
              jd = jd + NumberofDays
              //Stubbed out the weekday/epoch names below to remove them from the HTML page.  jd = epoch time wd = weekday
              //document.myform.JD.value=jd
              //document.myform.wd.value=weekDay(jd%7)
                                                      if (jd> 2299160 )
                                                                 l=jd+68569
                                                                 n=intPart((4*l)/146097)
                                                                l=l-intPart((146097*n+3)/4)
                                                                 i=intPart((4000*(l+1))/1461001)
                                                                l=l-intPart((1461*i)/4)+31
                                                                 j=intPart((80*l)/2447)
                                                                d=l-intPart((2447*j)/80)
                                                                l=intPart(j/11)
                                                                m=j+2-12*l
                                                                y=100*(n-49)+i+l
                                                      else
                                                                 j=jd+1402
                                                                 k=intPart((j-1)/1461)
                                                                 l=j-1461*k
                                                                 n=intPart((l-1)/365)-intPart(l/1461)
                                                                 i=l-365*n+30
                                                                j=intPart((80*i)/2447)
                                                                d=i-intPart((2447*j)/80)
                                                                i=intPart(j/11)
                                                                m=j+2-12*i
                                                                y=4*k+n+i-4716
              document.myform.CDay.value=d
              document.myform.CMonth.value=m
              document.myform.CYear.value=y
    </SCRIPT>
        <FORM NAME="myform">
    <strong>gregorian</strong>
      <select size="1" name="CMonth" onChange="chrToIsl(0);">
        <option selected value="1">1</option>
        <option value="2">2</option>
        <option value="3">3</option>
        <option value="4">4</option>
        <option value="5">5</option>
        <option value="6">6</option>
        <option value="7">7</option>
        <option value="8">8</option>
        <option value="9">9</option>
        <option value="10">10</option>
        <option value="11">11</option>
        <option value="12">12</option>
      </select>
    <select size="1" name="CDay"  onChange="chrToIsl(0);">
        <option selected value="1">1</option>
        <option value="2">2</option>
        <option value="3">3</option>
        <option value="4">4</option>
        <option value="5">5</option>
        <option value="6">6</option>
        <option value="7">7</option>
        <option value="8">8</option>
        <option value="9">9</option>
        <option value="10">10</option>
        <option value="11">11</option>
        <option value="12">12</option>
        <option value="13">13</option>
        <option value="14">14</option>
        <option value="15">15</option>
        <option value="16">16</option>
        <option value="17">17</option>
        <option value="18">18</option>
        <option value="19">19</option>
        <option value="20">20</option>
        <option value="21">21</option>
        <option value="22">22</option>
        <option value="23">23</option>
        <option value="24">24</option>
        <option value="25">25</option>
        <option value="26">26</option>
        <option value="27">27</option>
        <option value="28">28</option>
        <option value="29">29</option>
        <option value="30">30</option>
        <option value="31">31</option>
      </select>
    <INPUT TYPE="text" NAME="CYear" VALUE="" SIZE="4" onChange="chrToIsl(0);" onKeyUp="chrToIsl(0);" >
      </p>
    <strong>hijri</strong>
    <select size="1" name="HMonth" onChange="islToChr(0);">
        <option selected value="1">1</option>
        <option value="2">2</option>
        <option value="3">3</option>
        <option value="4">4</option>
        <option value="5">5</option>
        <option value="6">6</option>
        <option value="7">7</option>
        <option value="8">8</option>
        <option value="9">9</option>
        <option value="10">10</option>
        <option value="11">11</option>
        <option value="12">12</option>
      </select>
    <select size="1" name="HDay" onChange="islToChr(0);">
        <option selected value="1">1</option>
        <option value="2">2</option>
        <option value="3">3</option>
        <option value="4">4</option>
        <option value="5">5</option>
        <option value="6">6</option>
        <option value="7">7</option>
        <option value="8">8</option>
        <option value="9">9</option>
        <option value="10">10</option>
        <option value="11">11</option>
        <option value="12">12</option>
        <option value="13">13</option>
        <option value="14">14</option>
        <option value="15">15</option>
        <option value="16">16</option>
        <option value="17">17</option>
        <option value="18">18</option>
        <option value="19">19</option>
        <option value="20">20</option>
        <option value="21">21</option>
        <option value="22">22</option>
        <option value="23">23</option>
        <option value="24">24</option>
        <option value="25">25</option>
        <option value="26">26</option>
        <option value="27">27</option>
        <option value="28">28</option>
        <option value="29">29</option>
        <option value="30">30</option>
      </select>
    <INPUT TYPE="text" NAME="HYear" VALUE="1430" SIZE="4" onChange="islToChr(0);" onKeyUp="islToChr(0);">
    <script>
    setDateToToday();
    </script>
    I just need the functionality if it can be achieved with a better script.

    Hi,
    Issue 1 - it doesn't convert to Hijri date, only Julian date for Hijri (doesn't show the Hijri date but does show two Gregorian dates).
    I am sorry I don't actually know how to convert between the dates, I only used the code that you provided in your initial post and called that from the Acrobat PDF form,
    The sample I provided is how to call the code above using Acrobat.
    Issue 2 -  I want to be able to have the dates default (if blank) to today's date
    That is easy enough to do in that you just use JavaScript to get the current date and time using the Date object.
    And it can convert dynamically as you could just attach the code to the change or exit events of the objects that you are using to select the date and run the code.
    I kept my sample simple and used buttons so it is easy for everyone to see how the code is called as you can look at the preferences of each button to see the JavaScript that is used.
    Regards
    Malcolm

  • WAD: Add variable to a called javascript function on button group item

    Hi All,
    I need your expertise regarding the following problem:
    To increase performance, I've decided to hide all analysis tables. To set these tables to visible, there is a button to switch the state for each table.
    Because this function is needed for each table, the function has two parameters for the analysis item name and the new state.
    Unfortunately, I get an useless error message after calling the function.
    The function in script item looks like
    function switchTable(itemName, newState)
    The function is started by a button of a button group item as javascript and the following script function
    switchTable('ANALYSIS_ITEM_1', 'VISIBLE')
    If I enter a without parameters, that will call the function with these parameters, it works.
    But if i try this directly from the script function in the button parameters, the function will be called correctly, but an error occurs and the analysis item wasn't displayed or the sendCommand wasn't processed completely.
    I hope there is a way to call javascripts by a button with variables, otherwise I would have to create many functions with only an other item_ref.
    Many thanks in advance and points of course for any help.
    Regards,
    Tobias

    One short note:
    It's possible to trigger the same function by an html input form button with onlick switchTable('ANALYSIS_ITEM_1', 'VISIBLE')
    and this works.
    Has anyone an idea what's the problem with a normal button item of the button group item?
    Another possibility is a menu item. The functions were called, but errors were shown.

Maybe you are looking for

  • How to get emails on iphone and mail on my computer?

    Hi there, I use mail on my Mac to get my emails and since getting my iphone i also use this. the problem is when i have mail on my computer open i only get emails sent to it. when i dont have it open i only get them sent to my iphone. how do i set it

  • Adobe print forms - Intergration with Webdynpro ABAP

    Hi We are working on SAP Adobe print forms with Webdynpro ABAP. We are getting the PDF form's Hexadecimal content as a part of the FPFORMOUTPUT parameter when we execute the FM of the Form. I tried to assign that to a context variable and assigned th

  • Can't get iCloud to open any of it features

    iCloud will not open any features. Message says long running script.

  • Creating new report 1st day of each month

    Hello, all! I have a vi that I run to record pressure on test units.  I want to create a new excel report on the 1st day of each month.  If it is not the 1st day of the month I want to just add the data for each test unit as a new worksheet.  I have

  • When should SAP Country Versions be activated ?

    Should SAP Country Versions be activated within the Global SAP Template prior to the wave roll outs to avoid retrofitting during the waves? Situation: We have completed the global SAP template and are ready to roll it out to 50 countries. Wave 1 (of