Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    David Castner
    @davidjcastner
    yea there is a value attribute for input elements http://www.w3schools.com/tags/att_input_value.asp
    Jonathan Herman
    @lantech19446
    ok
    David Castner
    @davidjcastner

    you can use this to set the value of the input when the page first loads too

    <input type="text" value="hello world">

    this input will start with hello world

    Note: this is different from the placeholder attribute which is like a fake version of value. The value of the input is still an empty string, and as soon as you start typing the placeholder value will disapppear.

    Example:

    <input type="text" placeholder="enter your name">
    Jonathan Herman
    @lantech19446
    right
    David Castner
    @davidjcastner

    Just looked this up, but a"more correct" way to clear inputs is to use

    inputElement.value = null;

    this has the added benefit (if this is want you want to happen of course) of removing the focus on the input. I've always used an empty string though and never had a problem

    Jonathan Herman
    @lantech19446
    dave, do you have your own copy of the ecma standard?
    David Castner
    @davidjcastner
    No I do not, but I usually read the articles that comes out about the changes to ecmascript
    Jonathan Herman
    @lantech19446
    o ok when you said you looked it up I was like well hell does he actually have like a printed out copy of ecma5 he uses as a desk reference lol
    David Castner
    @davidjcastner

    and here is the "correct way" to clear an entire form:

    <form id="form">
        <input id="input">
    </form>
    //document.getElementById('input').value = null; // sinlge input
    document.getElementById('form').reset(); //all inputs

    again this has the added action of removing the focus from the form (prevents double submissions)

    Jonathan Herman
    @lantech19446
    interesting
    Mike
    @dcpking
    Printed copy, Jonathan? Nope. It's all in a small USB plug located just behind his left ear :)
    Jonathan Herman
    @lantech19446
    lol
    David Castner
    @davidjcastner
    hah
    Jonathan Herman
    @lantech19446
    if only that were true and I could just download the knowledge about javascript lol David would be the giver
    David Castner
    @davidjcastner
    I am always learning new things, I think I will implement this at work starting monday
    Jonathan Herman
    @lantech19446
    btw @dcpking have you ever been so happy to be on this side of the pond as you are today?
    David Castner
    @davidjcastner
    you mean Britain leaving the EU?
    Mike
    @dcpking
    Total shock! First thought was "where are all the birth certs and all ... time to head down to D.C. and the Irish Embassy to get my citizenship !
    David Castner
    @davidjcastner
    @dcpking do you know how this affects citizenship, I was born in london and am a British/UK citizen too
    Jonathan Herman
    @lantech19446
    I'd assume since the UK and Britain still exist and Ireland is still a member of the UK you're both good, one of the upsides of not having an actual EU passport
    Mike
    @dcpking
    @davidjcastner Are you actually a citizen, or were you just born there? I don't believe the UK is a country where you get citizenship by birth (though I'll check)
    @lantech19446 There isn't such a thing as a EU passport or citizenship
    David Castner
    @davidjcastner
    I have a UK passport, I'm a dual citizen since my parents lived there for 7 years
    Jonathan Herman
    @lantech19446
    right I'm saying it's a good thing there isn't
    Mike
    @dcpking
    Ah. Ok - you omitted that bit :) In that case you're a Brit unless youexplicitly renounce your citizenship
    The Brexit will take about 2 years, so you can go and work in Europe at least for that long!
    David Castner
    @davidjcastner
    yea I forget the part about birth not counting sometimes, if i remember correctly it's residency and having another non blood related citizen vouch for you
    Jonathan Herman
    @lantech19446
    it sounds like they want them out faster, David Cameron was going to leave the exit to his successor and they basically said screw you guys we're starting now
    Mike
    @dcpking
    Ireland isn't part of the UK - Northern Ireland is, but the other 3/4 of the island is The Republic Of Ireland. A completely different country.
    @davidjcastner Yep. But if you went far enough to get a passport then you are "in" ... make sure you keep the passport alid (renew it when needed)
    BTW, good info here: http://www.marketplace.org/
    David Castner
    @davidjcastner
    alright, this might have an impact on my sister though, she's taking full advantage of the EU and has been working in Italy for almost 5 years now
    @dcpking thanks that looks like a good place to start reading
    Mike
    @dcpking
    Well, there's no way of knowing what the effect on Brits in Europe will be - she's American too?
    David Castner
    @davidjcastner
    yea all my siblings and I are dual citizens
    Jonathan Herman
    @lantech19446
    good stuff someone else who listens to npr
    Mike
    @dcpking
    @lantech19446 :) @davidjcastner Out of a British population of 70 million, about 4.5 million live and work overseas, and about 1.5 million in Europe. I think I read somewhere that Britain has the highest proportion of people with passports who have travelled overseas of any country aside from places like Luxembourg, Singapore, and Andorra!
    So there's going to be a lot of people in the same position as your sister, David
    Mike
    @dcpking
    (breaking news! Unicode Institute added 72 new things this week ...... what things?)
    Lily Romano
    @Lilyheart
    birds
    Mike
    @dcpking
    (Lily would know this, I'm shure!)
    [you're here ??? ] nope
    David Castner
    @davidjcastner
    aren't they always adding new things?*
    Mike
    @dcpking
    @davidjcastner yes, but what?
    Lily Romano
    @Lilyheart
    BIRDS!
    THREE OF 'ME
    'EM
    Mike
    @dcpking
    There are some in there ...