Javascript in Adobeform problem

Hello,
Is there any Java commands that let us know if internal table data existe in a page or not ?
The scenario is :
In the master page I have a line title like:
Material  number      Description
M00000                    Material test 0
M00001                    Material test 1
M00002                    Material test 2
These data will existe in many page depending on how many records there are in the internal table .
At the end there's will be a " Condition term text..." And I will have to check if in this last page there's at least 1 records printed or not ? if there's no material line in last page I will hide the title in the master page using the java script : this.presence = "Invisible". If there's at least 1 material line I will not hide this title .
Thanks you very much for your help.

Hello,
Thanks for your quick answer.
Could you please show me in detail how to do this. In the form it's not possible to count the record because it contains free text ( Purchase order text) so that I think making a flag is more OK . But I really do not know how to do this ? ( I am new to Adobe) . Could you please help me ?
Thanks in advance

Similar Messages

  • Need a JavaScript for a problem using Dreamweaver

    Hi I need help with making a javaScript for this problem I have. Can you please respond to my email also with the help I need.....[email protected]
    This is what I am trying to do.  I usually do it in PHP with no problem, but have to do it in javascript.  I need to make a page called index.shtml.  That pages needs to have three different sections but only display one section at a time based off of the url.  So for example index.shtml?loc=132 will display sample 1 and index.shtml?loc=133 will display sample 2.  While index.shtml?loc=134 will display sample 3.  So pretty much the content is all on one page but only displays based off of what the url is.
    I was told to post this problem in the Dreamweaver forum.
    Thanks for the help!!

    There are different ways to achieve this. So that we give can give you with tailoured solution, please give us a link to your site.
    Gramps

  • JAVASCRIPT AND JSF PROBLEM REFRESHING PAGE PROBLEM

    Hello everyone, I am currently using visual JSF and javascript to to disable a fileupload component when a radio button is clicked. I don't have any problems getting it to work if I need to disable a button, a textfield or other visual JSF components. For some reason, i can't disable the fileupload component and I get this error when the JAVASCRIPT is called:
    Error: document.getElementById("form1:fileUpload1").refresh is not a function
    Source File: http://localhost:8080/TestSingleEvent/theme/com/sun/webui/jsf/suntheme4_2-080320/javascript/webui.js
    Line: 22
    My javascript code is the following:
    document.getElementById("form1:fileUpload1").refresh("form1:radioButton1");return false;
    I would appreciate some help here. Why is it that when I replace the fileUpload with i.e a textfield i don't get errors..
    Is it something to do with the webui.js ?
    Many thanks.

    There is no such thing as refresh() in the [DOM element|http://developer.mozilla.org/en/DOM/element]. How did you come to this? Did you a wild guess in the around without reading the docs? Don't do that.
    What exactly do you want to achieve? Reset its value? Then set the 'value' property to null. Disable the element? Then set the 'disabled' property to true.
    I've been helpful enough with this offtopic question. If you still stucks, please continue at a Javascript oriented forum. There's one at under each webdeveloper.com.

  • Javascript rendered flash problem

    Hi,
        I'm doing something kind of funky to facilitate some functionality.  I've got a client that has some camtasia style demos he wants to play of his product.  Problem is he wants the demos to play on top of the website and then have the ability to click a button to turn off the demo.  Now I've done that and it works great locally but when deployed to the server the flash based demo doesn't play until the entire object is downloaded.  In reality that's probably how it's working locally as well.  
        You can see the results by going to http://www.wbsus.com/beta/  click on the "view video demo" on the left side there in the circle.  A small submenu will popup click on one of the first two and you'll see what I mean.  If you wait long enough for the entire demo to download it'll start.  There IS a preloader in this swf but it's not firing because the flash object doesn't play until the entire swf is downloaded.  Locally the preloader fires up just fine.
    Below is a snippet of the code used to add a demo to that page dynamically via javascript.
    document.getElementById(
    "DemoMenu").style.visibility = "hidden";
    var 
    newdiv = document.createElement('div');
    newdiv.setAttribute(
    'id', 'ReceivingDemoII');
    newdiv.style.zIndex = 820;
    newdiv.display =
    "block";
    newdiv.style.position=
    "absolute";
    newdiv.style.top=
    "0px";
    newdiv.style.left=
    "30px";
    newdiv.style.visibility=
    "hidden";
    newdiv.style.backgroundColor=
    "#FFFFFF";
    document.body.appendChild(newdiv);
    html=
    "<input type='button' value='Close' onclick='closeReceivingDemoII()' />";
    html+=
    "       May take up to 90 seconds to load demonstration.<br/>";
    html+=
    " <OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' WIDTH='1024' HEIGHT='790'>";
    html+=
    "<PARAM NAME=movie VALUE='" + returnPlace + "Demos/wbsreceiving.swf'>";
    html+=
    "<PARAM NAME=quality VALUE='high'>";
    html+=
    "<EMBED src='" + returnPlace + "Demos/wbsreceiving.swf' quality='high' WIDTH='1024' HEIGHT='790' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'>"
    html+=
    "</OBJECT>";
    html+="<br /><br />";
    html+=
    "<input type='button' value='Close' onclick='closeReceivingDemoII()' />";
    newdiv.innerHTML = html;
    document.getElementById(
    'ReceivingDemoII').innerHTML = html;
    document.getElementById(
    'ReceivingDemoII').style.visibility="visible";
    So I dynamically create the div.  Append it to the DOM.  Add the inner html that defines the object.  "returnPlace" is a field that may or may not depending on where the site is hosted,(localhost, production,beta), return a prefix like in this case http://www.wbsus.com or http://www.wbsus.com/beta.   This was done to assure that the object path was complete.  
    So after all that.  The demo plays, it just sits and waits for the entire demo to download and then the object starts to play.   It's like active-x is keeping it from playing until the entire object is downloaded because there is a working preloader in this flash object.   Behavior is the same in Firefox and I.E..  Thanks for any and all help!
    Randy

    Kind of right but the solution was a bit odd but it works and that's l I care.   The solution was to put a javascript delay in making the div visible.  If the div is rendered immediately like the code in my original post does, the object for some reason is not allowed to activate (play) until it is completely downloaded.  If however the div is rendered as hidden, and then a delay happens and then the div is made visible.  The browser has enough time to render the div and then recognize that there's an active-x component there, and take the appropriate action when the div is activated (made visible)  so I added
    currentDivToPlay = "(whatever was just built)"
    setTimeout(
    'turnOnGeneralDemo()', 700);
    and the function
    function turnOnGeneralDemo(){      document.getElementById(currentDivToPlay).style.visibility=
    "visible";}
    With the delay for the browser all works well.

  • Javascript API $x_uptill problem

    Hi people,
    I have a little boring problem...
    Simply I made this function in order to hide & show a page element with it's label
    function ApplyVisible(obj, Visible){
    var lblobj = html_GetElement(obj);
    labels = document.getElementsByTagName("LABEL")
    for(var i = 0; i < labels.length; i++){
    if(labels.getAttribute("for") == lblobj.id){
    var lbl = labels[i];
    break;
    var td = $x_UpTill(obj, 'TD');
    if ($x_UpTill(obj, 'FIELDSET'))
    var fieldset = $x_UpTill(obj, 'FIELDSET');
    but the function $x_UpTill raise an exception when an upper node element with FIELDSET tag does not exists
    E is null
    http://myhost:myport/i/javascript/apex_3_1.js
    Line 1
    What I'm wrong?
    Thanks all
    Claudio

    Hello,
    >> I don't want to hide all table row
    APEX uses tables to layout items. Each item is comprised of two table cells – one for the item label, and one for the input part (element in APEX terms). So, if you want to hide a single item (label and element) on your page, which reside on a single form row, the JavaScript function I mentioned is the one to use. If you have more than one item on the form row, you’ll need different approach, depends on your exact layout. In this case, $x_UpTill() will probably not be relevant, because you’ll be looking for sibling nodes, and not parent ones.
    And to your original JavaScript code. It’s very hard to debug a code without see the actual page and item layouts, so I’ll speak in general.
    First, the ‘fieldset’ tag doesn’t wrap the label part of the item, only the element part, so cascading up to it, will not hide the label.
    Second, the ‘label’ tag is not used with all the items, even not with all the items that wrapped with ‘fieldset’. For example, a date picker item includes ‘fieldset’ but not ‘label’. In your code, you are retrieving all the ‘label’ tags, but for many items on your page, it might return null.
    If you want something more specific, you should post an example on apex.oracle.com.
    Regards,
    Arie.
    Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.

  • Enable your Internet browser to accept cookies and make sure that javascript is enabled problem

    I am have problems logging onto adcenter.microsoft.com
    As soon as I try to submit my user/pass I get the msg:
    "Please enable your Internet browser to accept cookies and make sure that javascript is enabled. If you aren’t sure how to do this, refer to your browser’s Help"
    I have done various tests to see if my browers does accept cookies and javascript is enabled, and all is good here.
    I also have the plugin Java plugin 2 for npapi 13.6.0. (I am running firefox on mac).
    I used to be able to log into the site. not anymore. Since then i must have updated firefox a few times.
    I have cleared cache/cookies. I have disabled all plugins/extensions. Still can't get in.
    What else can i do?
    I have spoken with microsoft adcenter, and all they could tell me was make sure i have the latest java, which i have i guess.

    To avoid confusion:
    *http://kb.mozillazine.org/JavaScript_is_not_Java
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    See:
    * [http://adcenterhelp.microsoft.com/help.aspx?project=adcenter_live_std&market=en-us&querytype=keyword&query=730yek&tmt=&domain=adcenter.microsoft.com&format=b1 Microsoft Advertising Help]
    Notes
    ** If you use Mozilla Firefox, you must enable cookies and JavaScript. Check the Help for Mozilla Firefox for info on how to do this.
    ** Currently, adCenter doesn't support Apple Safari or Google Chrome.
    ** Also, adCenter currently doesn't run on Apple Mac OS, Virtual PC, or mobile phone platforms.

  • JavaScript -Applet Communication problem

    Hi All,
    Requirement : Onclick of particular location of loaded applet. I am calling JavaScript function which will render the table(as a popup like a bubble).
    Problem Description:
    I am calling below javascript function from Applet. Javascript function contains the code which create a table (popup). We have verified the JS function and it is displaying in normal HTML.
    JavaScript Function
    function CreateBubble(txt)
    var t= GetElement('TABLE');
    //t.style.background = 'white';
    t.cellSpacing=0;
    t.cellPadding=0;
    var r,c;
    r=t.insertRow();
    c=r.insertCell();
    c.innerHTML='<img src="images/nw.gif">';
    c=r.insertCell();
    c.innerHTML='<img src="images/n.gif">';
    c.style.background = 'url("images/n.gif")';
    c=r.insertCell();
    c.innerHTML='<img src="images/ne.gif">';
    r=t.insertRow();
    c=r.insertCell();
    c.innerHTML='<img src="images/w.gif">';
    c.style.background = 'url("images/w.gif")';
    c=r.insertCell();
    c.style.background = 'url("images/1.gif")';
    c.style.backgroundColor='white';
    if(txt.tagName)
    c.appendChild(txt);
    else
    c.innerHTML=txt;
    c=r.insertCell();
    c.innerHTML='<img src="images/e.gif">';
    c.style.background = 'url("images/e.gif")';
    r=t.insertRow();
    c=r.insertCell();
    c.innerHTML='<img src="images/sw.gif">';
    c=r.insertCell();
    c.innerHTML='<img src="images/s.gif">';
    c.style.background = 'url("images/s.gif")';
    c=r.insertCell();
    c.innerHTML='<img src="images/se.gif">';
    return t;
    function GetElement(t){return document.createElement(t);}
    When I call CreateBubble(txt) function from Applet. It is not rendering table. If i put the alert inside the function then it displays. I tried to debug by puttting alert before return statement of the JS function. It still display the alert box, but doesn't display the table.
    I am not sure but the applet might be overshadow the table created through java-script.
    This is my applet code:
    public void mouseClicked(MouseEvent e)
              System.out.println( "Mouse clicked in applet - Getting JSObject" );
              System.out.println(("X, Y :" + e.getX() + "," +e.getY()));
              //First segement point
              if(e.getX() > 200 && e.getX() < 212){
                   JSObject jso = JSObject.getWindow( enclosingContainer );
                   System.out.println( "Getting JSObject - SUCCESS" );
                   System.out.println( "Invoking the script..." );
                   String [] args = new String[] {"acdd"};
                   jso.call("CreateBubble", args);
    Let me know are there any other approach to do so?
    Thanks
    Chintan

    Only pass strings between applets and JS. They both use unicode, so it works. Other data types, including primitive, don't work well.
    In your JS code, you say, txt.tagName. This doesn't make sense if txt is a string.
    Also, your Java code to call the JS looks funny. See the Java code in reply #11 in this thread: http://forum.java.sun.com/thread.jspa?forumID=421&threadID=482551

  • Javascript in servlet Problem

    Hi,
    I am trying to execute a small javascript part in the servlet..The problem is I need to call the javascript function from the middle of the body of html generated by servlet..
    catch (AlreadyRegisteredException aEx)
    {   System.out.println(aEx);
    out.println("<script>");
    out.println("<!--");
    out.println("cancel(true)");
    out.println("//-->");
    out.println("</script>");     
    Where cancel(k) is already declared at the start of HTML...
    The browser fails to interpret any javascript script in middle of HTMl ?It worked in JSPs?
    Any idea where I might be going wrong or can you call javascript like this atall in servlet from middle of HTML?
    Thanks
    Ash

    I guess it cannot generate client side scripting just on the fly based on some event to occur...
    Ash

  • Javascript Adobe Reader problem in some linux distributions

    Adobe Reader doesn't execute initial javascript code of 3D scene in pdf document. With friends we've tested several linux distributions, namely CentOS, Ubuntu, Arch Linux, Mandriva, OpenSUSE. Also several Adobe Reader versions like 9.4.6 or 9.1. No luck. For some reason though, it works fine in Fedora (with exactly the same Adobe Reader). Here is an example pdf for test: http://www.2shared.com/document/LIbyWm_ … _dice.html . Just open the mysterious_dice.pdf and you should see a rotating dice. If you dont, javascript wasn't executed properly (it should be easy to check in Windows 7/XP or Fedora).
    We thought that something is wrong in Reader settings (like disabled javascript), but javascript was always allowed. Then that maybe it is linux Adobe Reader bug, but again, why does it work in Fedora? So maybe some package(s) or something.
    Another example is the Asymptote application, which uses javascript at the beginning for some scene settings (lights, camera position, etc) and especially with orthographic projection this problem shows up. More about this here: http://sourceforge.net/projects/asympto … ic/4021157.
    Any idea what might be wrong with this? I will just add that javascript later on works, only the initial code is ignored. Thanks for any suggestion.

    Interesting, just to be sure, was your dice spinning around? If it was, then it really works. My friend with Arch i686 just tried it with Adobe Reader 9.4.2, same settings and the dice was static. He provided also screenshot to show how it looks on his system together with some info:
    Last edited by Sil (2011-11-17 17:05:55)

  • Javascript Mozilla Firefox problem

    == Issue
    ==
    I have feedback about Firefox or would like a new feature
    == Description
    ==
    netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserWrite"); window.open('','_self'); window.close(); unable to trigger force close.
    Hello Sir/Madam,
    In a simple example as shown below:
    Detecting browser close in IE
    function ForceCloseWindow()
    if(navigator.appName.toLowerCase()=="netscape")
    netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserWrite");
    window.open('','_self');
    window.close();
    else
    try
    window.open("","_self");
    window.close();
    if(window || window.focus)
    window.focus();
    catch(e){
    window.open("","_parent");
    window.close();
    This works flawless. But when I incorporate it in my JScript.js big project and call the javascript function ForceCloseWindow() it did not work :c
    Error message of e.toString() states that 'A script from "http:" was denied UniversalBrowserWrite privileges.'
    My question follows. How can I programmatically enable UniversalBrowserWrite privileges.
    Thank you. Please advise.
    I still love firefox from all the browsers..
    Thanks Thanks.
    == Firefox version
    ==
    3.6.3
    == Operating system
    ==
    XP
    == Plugins installed
    ==
    n/a

    This issue can be caused by the McAfee Site Advisor extension
    *https://community.mcafee.com/message/203466
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • Javascript print button problem in C4

    Hi Everyone,
    I'm currently using Captivate 4 and would like to allow users
    of my tutorial to print off slides. I created a button which
    executes javascript to do this. The problem is not that this
    doesn't work at all, it's just that it isn't working when I publish
    to Flash player versions higher than 7. Any ideas you might be able
    to share with me on how to fix this will be very welcome.
    Many thanks.

    I suspect that the problem has to do with the added security
    included in Flash 8 and above that restricts javascript. If you
    search the flash player KnowledgeBase on Adobe.com you'll find more
    detailed information about fixes, but here is what worked for my
    Javascripted items.
    Find your Program Files > Adobe > Adobe Captivate 4
    > Templates > Publish folder. Within the folder is a
    standard.htm file. Open this file (for this simple task, i just use
    notepad). In the script section, add...
    so.addParam("allowScriptAccess", "always");
    you'll see other similar param declarations. It doesn't
    matter the order.
    You can edit the individual .htm file if you want to test
    this first.
    That should do it.
    Here is the KB article that discusses the security features
    in greater detail:
    http://www.adobe.com/devnet/flashplayer/articles/secure_swf_apps_04.html

  • JavaScript/HTML notification problem

    Below problems are in JavaScript/HTML only. In Flex both works well.
    In JavaScript/HTML on Mac, dock icon bounces only once in CRITICAL.
    Below 3 cases(type, CRITICAL, "aaa"), same results.
    How do I use JavaScript code to react doc icon repeatedly?
    function notify() {
    if (air.NativeApplication.supportsDockIcon) {
    var critical = document.getElementById("critical");
    var type = (critical.checked ? air.NotificationType.CRITICAL : air.NotificationType.INFORMATIONAL);
    //air.NativeApplication.nativeApplication.icon.bounce(type);
    //air.DockIcon(air.NativeApplication.nativeApplication.icon).bounce(air.Notific ationType.CRITICAL);
    air.NativeApplication.nativeApplication.icon.bounce("aaa");
    function setListener()
    nativeWindow.addEventListener(air.Event.DEACTIVATE, notify);
    </script>
    </head>
    <body onload="setListener()">
    And I have another problem on Windows just as Mac.
    Below cases(type, CRITICAL, ,no argumens) are same results.
    Application windows and taskbar flash only once.
    How do I use JavaScript code to flash window and taskbar??
    function notify(){
    if(air.NativeApplication.supportsSystemTrayIcon && air.NativeWindow.supportsNotification) {
    var critical = document.getElementById('critical');
    var type = (critical.checked ? air.NotificationType.CRITICAL : air.NotificationType.INFORMATIONAL);
    window.nativeWindow.notifyUser(type);
    //window.nativeWindow.notifyUser(air.NotificationType.CRITICAL);
    //window.nativeWindow.notifyUser();
    function setListener(){
    window.nativeWindow.addEventListener(air.Event.DEACTIVATE, notify);
    </script>
    </head>
    <body onLoad="setListener()">

    I've got the same problem.
    Using Javascript/HTML the icon only bounces once in OS X and the system tray doesn't even highlight in Windows XP Pro for me.
    I have also tried every permutation of use for:
    air.NativeApplication.nativeApplication.icon.bounce(air.NotificationType.CRITICAL);
    -- and --
    air.NativeApplication.stage.nativeWindow.notifyUser(air.NotificationType.CRITICAL);
    And still nothing works as you describe  in:
    http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7dcd. html
    -- and --
    http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7dcb. html
    any suggestions as to how I can overcome this issue would be appreciated.

  • Javascript .js caching problem?

    I am noticing a problem with a javascript .js file deployed in my web application. Web AS does not pick up new changes to this .js file. Web AS keeps picking up the older copy of the .js file deployed in a war file. I have deleted the ear file created under and redeployed:
    /usr/sap/J2E/JC00/SDM/root/origin/sap.com/myapp/localhost/2005.06.24.08.27.35
    Where is Web AS caching the deployed files? Why doesn't the refreshed copy of the .js get deployed? Rest of the application deploys fine except for the javascript file.
    Can some one please comment on any similar experience?
    Thanks for the help.

    Hi Ray,
    static files like .js or .css are cached in the J2EE Engine's http cache. If the http cache is enabled you can't "fix" the problem with a shift+refresh. This only helps when the file is cached on client side.
    You can clear the cache with the visual admin tool.
    -> server
    -> services
    -> HTTP Provider
    There, look for the trash can icon in the row on the top and click it. You may also edit the cache properties or just turn it off for development in the properties tab.
    Regards, Karsten

  • Anygantt with javascript 32k example problem

    Dear all,
    I have tried the example from Tobias http://apex-at-work.blogspot.com/2011/04/handling-32k-problem-in-apex-charts.html.
    Unfortunately the chart will not be displayed. I have set the textarea to visible. The XML is correct. The XML (short version) works fine in the normal apex gantt chart procedure.
    I am not sure if the swf file will be found...
    HTML Page source:
    </periods>
    </resource_chart>
    </anygantt></textarea>
    <div id="chartDiv"></div>
    <script type="text/javascript" language="javascript">
    /* Set default swf path */
    AnyChart.swfFile = '/i/flashchart/anygantt_4/swf/AnyGantt.swf';
    /* Create new gantt chart */
    var chart = new AnyChart();
    chart.width="2500";
    chart.height="1400";
    /* Get string data from text area */
    var data = document.getElementById('rowData').value.toString();
    /* Set data */
    chart.setData(data);
    /* Write chart to "chart" div */
    chart.write("chartDiv");
    </script>
    Using Application Express 4.0.2.00.08
    Linux system
    Thanks for your help.
    Birthe

    Hi all,
    I got the solution this morning...
    The problem of the example is the JS command for the header.
    I have changed it this way :
    <script src="/i/flashchart/anygantt_4/js/AnyChart.js" language="javascript"></script>
    Bye,
    Birthe

  • Omni portlet - javascript - date field problem

    I want to manipulate a database date type field with javascript in omniportlet layout.
    In the source tab of omniportlet I use the SQL: (it's very simple for example)
    select id, to_char(enddate, 'DD/MM/YYYY HH24:MI') edate, enddate
    from tlh.auctionsession
    where id = 1
    In the layout tab (HTML form). I write this javascript code in Repeating Section: (it's very simple for example)
    <script type="text/javascript">
    document.write(##EDATE##);
    </script>
    It's not woking. Anytime I use the ##EDATE## or ##ENDDATE## in my javascript code, It's not working.
    If I put ##EDATE## of ##ENDDATE## in the HTML's body, it's display well.
    I am really mad with it.
    Do you have any idea? Please help me with it. Thank you very much.
    Sorry for my bad English.

    // custom vaildation scirpt for entered date being today or a future date;
    // date format for the field;
    var cDateFormat = "mm/dd/yyyy";
    // convert the entered value to a date objecta;
    var oEntered = util.scand(cDateFormat, event.value);
    // strip down to just the year, month and day
    oEntered.setFullYear(oEntered.getFullYear(), oEntered.getMonth(), oEntered.getDate());
    // convert todays date to a date object;
    oToday = util.scand(cDateFormat, util.printd(cDateFormat, new Date()));
    // strip down to just the year, month and day
    oToday.setFullYear(oToday.getFullYear(), oToday.getMonth(), oToday.getDate());
    // compare the date values
    if(oEntered.getTime() < oToday.getTime()) {
    // error message date before today's date
    app.alert("Date must be today's date or a futuer date!", 1, 0);
    // set return code to error status;
    event.rc = false;
    // validation is assumed to be true unless the event return code value is false;
    // end custom validation script;

Maybe you are looking for