Cfinput question - javascript, DOM, etc.

Hi, I have a form which includes the following inputs:
<cfinput type="datefield"
                           id="startDate"
                        name="StartDate"
                        value="#StartDate#"
                        message="Start Date is required!"
                        required="yes"
                        validate="usdate"
                        validateat="onsubmit">
<cfinput type="datefield"
                        id="endDate"
                        name="EndDate"
                        value="#EndDate#"
                        message="End Date is required!"
                        required="yes"
                        validate="usdate"
                        validateat="onsubmit">
I've written a JavaScript function that listens to the startDate field and if modified, sets the endDate field to the same time:
<script type="text/javascript" language="javascript">
                function populateEndDate(){                  
                    date = document.getElementById("startDate").value;
                    document.getElementById("endDate").value = date;

Thanks Dan,
I tried onBlur already. The problem seems to be that when you use the date popup, although the input field gets populated with a valid date, it doesn't behave like you actually clicked in the field, or edited it, or left it. So if you use onBlur and enter a date using the popup, you need to also then click in the input field and then click elsewhere for onBlur to trigger, which is obviously not what I want.
So I figured that a better way to do it would be to attach an eventListener to the input field, which would theoretically be able to register any change that occurred in that field, whether it was from direct input or via the Date popup. But I'm stuck because I can't figure out exactly how to do this.

Similar Messages

  • What is going on? My password works here but when I used it to check about find my phone, it got complicated, put in answer to question, get email, etc.

    What is going on? My password works here but when I used it to check about find my iphone, it got complicated, put in answer to question, get email, etc.

    No, dude, if this guy can use it, so can most of his other neighbors. Let's point out a few things:
    1. This is very poor security, not to mention irresponsible of the neighbor to open his wireless to every person and pervert in his neighborhood!
    2. This guy still has NO control over who's using is, so of course bandwidth will be affected
    3. Until the neighbor locks it down to just 2 people, of course it will be slow
    Let's start using our brains before we have the poor guy start deleting plists, getting the apple broadband utility, rebuilding his O/S, reinstalling the combo updates and/or repairing permissions (good one!) .... he simply has NO control over the speed of that which he's using/stealing.
    Power Mac G5 Dual 2Ghz/iBook G4 1.42Ghz   Mac OS X (10.4.7)   2.5 Gig, Rad 9800 Pro 256M

  • Air - JavaScript DOM problems

    Dear Air-friends,
    Have a look at this short html:
    <html>
    <head>
    <script type="text/javascript"
    src="AIRAliases.js"></script>
    <script>
    var i = 0;
    var click = function() {
    var a = document.createElement("a");
    a.innerHTML = "click me " + i++;
    a.setAttribute("href", "#");
    a.setAttribute("onclick", "click()");
    document.getElementById("body").replaceChild(a,
    document.getElementsByTagName("a")[0]);
    </script>
    </head>
    <body id="body" onload="click()">
    <a />
    </body>
    </html>
    when I run this using adl something strange happens:
    - I get a "click 0", after I click a "click 1" and ....
    that's it! no continuous "click 2", etc.
    I isolated this problem to this example, but actally I need
    it for context menus in my air application.
    Can someone help? I'm out of ideas.
    Thanks,
    Harrold Korte

    Hi Joe,
    First of all, thanks for your quick reply!
    Maybe I isolated the problem a bit too much. In fact, I'm
    creating context menus using xslt.
    Each time, a new context menu is put under a node called
    <div id="wrap-menu"> containing
    a <ul> of <a>s. It is in these subsequent
    refreshing of the context-menu (produced by xslt)
    where I observed this behaviour (first time ok, second time
    nop). Should I alter each <a> in the produced context-menu
    with addEventListener afterwards?
    I have the feeling that in that case I could didge xslt as
    well. Unfortunatly, I'm a big xslt fan to create
    html output (instead of all these program lines of unpacking
    and DOM manipulation). I'm porting an
    application from JS/PHP to Air because of the file system
    access which is exactly what I was looking for.
    Thanks again,
    Harrold Korte

  • Had to change my Apple ID because the original email address is no longer valid.  How do I change the iCloud user name on iMac?  I found instructions about signing out of iCloud and signing back end.  It asks questions about contact, etc.

    Had to change Apple ID due to email address no longer valid.  Trying to change id for icloud...saw direction online about signing out of icloud and signing back in...when it ask questions about contacts, photos, etc. being deleted how do I answer those?  That just sort of freaks me out.

    For the ones that give you an option, select the option you want (keep on the Mac or Delete). For the ones that are simply warning you, click on Delete from Mac.
    They will all come back when you sign back on, since all you did was change your existing Apple ID to a new email address. It's the same iCloud account, just with a different name.
    It's the only way to get your updated ID signed onto iCloud.
    Cheers,
    GB

  • Mapping Question p3: .. etc.. namespace prefixes

    Does anyone know why xi uses namespace prefixes like p3: p2: etc..?  I am trying to map based on an rfc as the target and a message from a wsdl as the source.  I can not test the map because it expects the test file ( from our partner ) to have all these P3:'s in it and it doesn't.  Here is a snippet of what is happening at translation ....
    <p3:Execute2 xmlns:p3="http://www.some/namespace/">
    <p3:transaction-limit type="Amount"><p3:value>99999999999</p3:value></p3:transaction-limit><p3:transaction-limit type="Number"><p3:value> 9999</p3:value></p3:transaction-limit></p3:daily-transaction-limits><p3:single-transaction-limits></p3:single-transaction-limits><p3:monthly-transaction-limits></p3:monthly-transaction-limits></p3:authorization-control><p3:request-type>Activate</p3:request-type>
    Message was edited by: Andrew Alpaugh

    Hi Andrew,
    the question is a little bit unclear to me. When I get you right, you have a WSDL that describes a message you get from a partner. You use this WSDL to define a Message Mapping. The Message Mapping does not work as expected. The fragment you have posted is probably what the Message Mapping seems to expect (according to the test panel). But the message you get from your partner looks different (it does not have all these prefixes).
    I suppose that the schema contained in the WSDL (more precisely in the types-section) states that all elements have to be namespace-qualified (this could e.g. be done by having an elementFormDefault="qualified" in the schema). Thus, if the elements are unqualified in the message you get from your partner it simply means that the partner does not stick to the WSDL.
    If this does not help you, I would have to see the WSDL and an example message that failed to work.
    Note, however that there are different ways to express namespaces. If the document sent by your partner looks as follows:
    <Execute2 xmlns="http://www.some/namespace/">
    <transaction-limit type="Amount">...
    it is logically equivalent to the one you posted, and the Message Mapping will treat them identical.
    Greetings
              Stephan

  • A few random questions- email, internet, etc.

    Hello. I'm a new Mac owner...and a little frustrated. I've been reading forums and help pages for the last two months. I have several questions. What's the most effective way to receive answers? Post all, hope for the best? or one question at a time?
    To begin, When viewing an email in mac mail I right click on a link. Sometimes my options include 'open behind mail' and other times it does not. What determines this? Is there a setting I can change to include it for all email?
    Second, my internet connection is very unstable. I need to determine what and where the problem is. The typical situation is a server not available and I usually have to go to sys pref and redo the settings. Or I just start turning everything off.
    As a new member to the forum, I've tried to read all the past posts I can and value the info found here. Please consider redirecting me if needed or sending me back to a pc forum if I cause too much trouble!
    Thanks-
    Tilly

    Hi Tilly,
    No way we are going to turn you over to the PC hordes again...
    Now I would say just fire off your questions and we will try to do our best and help you.
    First things first: you might not be used to it from Outlook, but the Mail program of MacOS X is smart, and mightily so (most of the time, after all it is only a piece of software). There are intelligent algorithms in Mail that recognize certain patterns like e-mail adresses, phone numbers, Links, postal adresses etc.
    Depending on what Mail thinks it recognizes it will offer you several options that are available to interact with that object. A short overview of the capabilities you can find in the help menu of the Mail application.
    Concerning your internet problem it is difficult to help, I would need to know more: what kind of internet connection do you use, what exactly is the error message, do they occur when you perform specific tasks or just irregularly.
    Cheers Mate,
    Rene

  • Urgent: Solaris newbie question: group permissions etc

    Hi
    I have a question on what is the best practice of working with solaris users and permissions. I'm using Solaris 10 and have created several users each with their home directory in /export/home. Then i have installed the sun webserver under /export/home/sun/webserver and i want all users to be able to use this, execute or copy over to the webserver.. would this be a valid solution or good practice solution tht i crete a group give it the permissions to read/write/execute and all the users i want to give this privilege to will be under this group. but then whats the use of having root like how would root user be different from the rest now...
    thanks...

    If you just want them to be able to publish to the web, apache has a little built in script in the httpd.conf that will hook in a user directory. Read the /etc/apache/httpd.conf file for more info.
    Whether this is best practice I am not sure. What you suggest will work but I would avoid it.

  • Question about DOM XML

    Hi Experts
    Do you Know how can I write I DOM XML
    the header of file I Mean
    <?xml version="1.0" encoding="iso-8859-8"?>
    Regards
    Yossi

    hi,
    say u have xml with following structure
    <xml>
    <Age>xyz</Age>
    </xml>
    to append age node, parse the xml string or file and try the following code
    HERE DOM is used
    Document xmlDoc = wdThis.ParseFile(xmlString);
    Node root=xmlDoc.getDocumentElement();
    Node AgeNode = xmlDoc.createElement("Age");
    Node AgeTextNode = xmlDoc.createTextNode("25");
    AgeNode.appendChild(AgeTextNode);
    root.appendChild(AgeNode);
    following code to parse the xml string
    public org.w3c.dom.Document mParseFile( java.lang.String XmlString )
    //@@begin mParseFile()
    //pearse the xml string passed
    IWDMessageManager mesg = wdComponentAPI.getMessageManager();
    String l_method = "mParseFile";
    //parsing xml string to xml document
    ByteArrayInputStream l_xmlDataInputStream = new ByteArrayInputStream(p_XmlString.getBytes());
    Document l_doc = null;
    InputSource in = new InputSource((InputStream) l_xmlDataInputStream );
    DocumentBuilderFactory l_dbf = DocumentBuilderFactory.newInstance();
    l_dbf.setValidating(true);
    l_dbf.setNamespaceAware(true);
    DocumentBuilder l_db;
    try {
    l_db = l_dbf.newDocumentBuilder();
    l_doc = l_db.parse(in);
    catch (ParserConfigurationException e) {
    } catch (SAXException e) {
    } catch (IOException e) {
    //returns xml document
    return l_doc;

  • Regex question; $1, $2, etc

    Hi,
    If I have the following regex Pattern set up:
    Pattern title = Pattern.compile("<title>([^<]+)</title>");and I want what's within the parentheses to be stored as a varialbe, the way it would be in perl:
    my $title = $1;or whatever, how do I do that in java? Couldn't find it on any of hte regex tutorials I was looking at.
    thanks,
    bp

    The JDK regex package doesn't store captured groups in local variables like Perl does. Instead, you have to retrieve them from the Matcher using the group(int) methods. However, you can use $1, $2, etc. in the replacement string when you do a replaceAll or replaceFirst, and the Matcher will replace them with the appropriate captured groups.

  • AIR SQLite timezone question (JavaScript)

    SQLite stores dates in UTC, which is great, but when I fetch the value, the resulting date object is incorrectly offset. Hopefully I'm missing something obvious and someone can point it out. Here's what I'm doing:
    CREATE TABLE myTable ("id" INTEGER PRIMARY KEY ,"created" DATE);
    INSERT INTO myTable (id,created) VALUES (1,DATETIME('NOW'));
    SELECT id,created FROM myTable WHERE id=1;
    My expectation is that the INSERT will store the current date/time adjusted to UTC. Because the AIR runtime casts date values to JavaScript date objects, my expectation is that the SELECT would give me back a valid date object, from which I could display either UTC or local time information. And it almost does.
    Suppose 'NOW' is 11:42:23 AM Pacific Time (GMT-8). I would expect the time information from toString() on the resulting date object to print something like "11:42:23 GMT-0800" but instead, I'm getting "19:42:23 GMT-0800". Clearly, it's a timezone issue because minutes and seconds look good. It's like AIR (or SQLite) is assuming that the value "11:42:23" is already UTC when inserting, and when AIR creates the resulting date object, it's applying the 8 hour timezone offset.
    I tried the solution posted here, which is to modify the INSERT as follows.
    INSERT INTO myTable (id,created) VALUES (1,DATETIME('NOW','localtime'));
    That works, but I don't want to store these values as local times, I want to store them as UTC and display them as local times. Meaning I should be able to store "11:42:23" in the Pacific timezone, and if I change to Eastern, I expect that value to be displayed as "14:42:43". When I use this solution, toString prints "11:42:23 GMT-0500".

    Update: Based on this topic on Stack Overflow, I tried changing the value in the insert from "DATETIME('NOW')" with a parameter:
    stmt.parameters[":created"] = new window.runtime.Date();
    (Aside: it's kind of annoying that AIR does not support JS dates, I'd like to see that change.)
    Anyway, this still doesn't solve the original problem. It works just like using DATETIME('NOW','localtime'). If the value goes in at 1:54pm PST, and I change the timezone to EST and read the value, it displays as "1:54pm EST", when I would expect it to be "4:54pm EST".
    Any advice is appreciated. Thanks!

  • Ethical question about privacy, etc for mailboxes

    Happy Sunday all,
    I am still fairly new to Exchange administration and this is the first time I have encountered something like this. I have been asked to restore a user's mailbox from a past date to another user's mailbox. I know how to do the restore and all that but I
    am wondering about the ethics of it. It's a very hush, hush deal here. I have only been told it is for a legal matter but no "formal" request (which is common for my work environment) to do this so I am a little hesitant to just do it. 
    This is my first encounter with anything of the sort. Any advice at all would be extremely helpful. Again, this is an ethical/privacy question not a technical question. Please excuse me if I have posted in the wrong area. I haven't been able to find anything
    that helps me on the web. 

    This is a good discussion and brings out interesting points, around process and how such tasks should be initiated.
    While this is all great guidance, none of us is in a position to fully answer since we don't know what country the original poster is located in.
    So as the guys have mentioned this is something that your firm's legal team and management must address and provide written guidance and policies on.  For example, are your users signing anything that waives rights and permits this? You have a AUP
    doc that covers this?
    I'm not a lawyer, but you certainly need one of them :)
    Cheers,
    Rhoderick
    Microsoft Senior Exchange PFE
    Blog:
    http://blogs.technet.com/rmilne 
    Twitter:   LinkedIn:
      Facebook:
      XING:
    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

  • Openntpd config question - security in /etc/ntpd.conf

    I read the NTP wiki page and installed openntpd.  It wasn't clear to me from the page if the default /etc/ntpd.conf was secure or if securing it requires additional lines.  Right now I'm using the default /etc/ntpd.conf which only contains a 'servers' line.  Are there any recommended lines to add security to this daemon or is this one-line config file sufficient security-wise?
    Thanks!
    Last edited by graysky (2009-08-07 22:41:48)

    majiq wrote:If I understand correctly: A) the security section on that page is for ntp and not openntp and B) It's only a security issue if you're using it to act as a server and not just as a client (the default config is for it to just be a client, so it shouldn't be a hazard)
    A) Right, I made a slight modification to the wiki page
    B) Okay, thanks for the clarification

  • Creating Images for Web, question about settings, etc.

    Okay before someone tells me "use the search function or google", let me say this...i already have.
    I am looking for a guide or anything to ALL settings and recommendations for photoshop cs4.
    I find different examples and such but nothing that is "great" and exactly what I need.
    When creating a new file that will be used for the web.  Logo, site graphics, etc. what are the best
    settings when creating a new document?  recommended settings for anything from the resolution, color mode
    to the "pixel aspect ration" under advanced.
    Basically I just need to do this part my self, i am pretty familiar with photoshop but just never took the time to actually know 100% of the best
    settings that i should use. 
    I just want to be able to create the high quality images i can for my website,
    I use .png for the most part {because i need transparency for several items}.
    but I notice that alot of times it has that little bit of blurryness to it, i tried messing with the resolution, i tried resize, i tried alot of things.
    my BIGGEST frustration and what ultimately led me to come to these forums was the use of the font, no matter what , my font always always always looks a bit blurry.  what can i do to take this effect of blurryness away?
    any and all help is appreciate and i give a thanks in advance!

    The best setting for the issues you describe is to work on your art in Photoshop at a 100% view and to place in a web page at 100%. Do not try to scale the images with HTML/CSS.

  • 2011 mbp questions: os, accounts, etc.

    hello good folks. i just bought a macbook pro for my daughter's birthday in 2 weeks, i don't want to set it up until then, and i have a couple of questions:
    1. how can i tell if it has lion pre-installed? i opened the box just to make sure everything looked okay and there was no os disc like there was with my 2010 macbook pro, is that a good clue?
    2. we already have 1 macbook pro, 2 iphone 4's and 1 ipod touch 4g in the house all with the same apple id and same itunes account. it works for us so i can keep track of my daughter's downloads. can i set this new mbp up with new admin account/password with parental controls, but still register it with the old apple id and  authorize itunes under the same apple id as always? does that question make sense?
    as always thanks for any help.

    iinami wrote:
    i wanted to figure it out without turning it on yet, but thanks.
    Oh sorry, I must have skimmed your message too fast. If there are no restore discs in the box, it's safe to assume it has Lion because I know for a fact Apple does not make restore discs anymore.
    Additional tip: If you want to have an easy means of restoring Lion, you can buy a Lion USB Thumb Drive for $70 (I know, typical Apple ripoff) at the store:
    http://store.apple.com/us/product/MD256Z/A
    In any case you'll find out when your daughter's birthday comes I suppose.

  • Oracle Licensing question (XDK samples etc)

    Hi,
    How can I get proof that the XDK is covered by the Oracle Client license, or is a free download and install?
    This is because in our organization for audit purposes I need to be able to show that it is free, or already covered by our license (I have Oracle client for Oracle 9i DB and ROAD)
    thanks for any help or ideas
    Philip

    In answer to your questions:
    1) Yes, you do still need to purchase the OLAP option if you want to give your users access to multi-dimensional data. If you do not intend to provide this feature then there is no requirement to purchase OLAP.
    2) Oracle BI10g is a pre-packed installation of products focused purely on Business Intelligence. The products that form the BI10g package are powerful new versions of BI products. Discoverer has been significantly upgraded and has a new user experience along with a host of new features. Also included is a new product called OLAP Spreadsheet Addin that allows Excel users to directly access the same OLAP data as Discoverer users. Our Business Intelligence Beans have also been improved to provide a more powerful declarative design environment within JDeveloper.
    3) Portal is a seperate installation option and package. However, with the Enterprise license option of the Application Server you get Portal and BI together. Oracle BI10g provides Discoverer Portlet Providers to allow portal pages to include Discoverer reports and list of workbooks/worksheets within a portal page. The Discoverer Portal solution also supports a very powerful feature called "personalization". You can get more information on this feature from the Discoverer home page on OTN.
    Hope this helps
    Hope this helps.

Maybe you are looking for