Results 1 to 5 of 5

Thread: What do you call this

  1. #1
    Join Date
    Nov 2011
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default What do you call this

    I have a screenshot on this attach document but I do not know what you call this type of function in a html form. Is it just simply a textarea with a scrollbar which allows you to select numbers higher or lower? If I know what it is then I can research this I find out how to code it myself.

    Thank You

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    If you could link us to the page we could tell you more about the code that generates it.

    That's not a standard HTML object of any kind. It's probably just a textbox with up and down buttons (images?) next to it that have Javascript events attached: add or subtract one from the value in the box when you click on them. It wouldn't be very hard to duplicate.

    I don't know of any scripts like that for a clock, but there must be some available for a date. You could try searching for something like "date input form" and see if you can find a tutorial or example script, then borrow some ideas from that.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    html5 includes the <input type="number"> - Opera and Chrome use an interface similar to the pic you posted (sometimes called a "spinner" but I think that's a somewhat inadequate name). The particular control you posted is probably a javascript thing, though.

  4. The Following User Says Thank You to traq For This Useful Post:

    djr33 (11-10-2011)

  5. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Ah, I wasn't aware of that. Interesting. Even if that does work in some cases, for current purposes you'd need a backup using Javascript, since it won't be supported in all browsers yet.

    Apparently there are lots of controls for it too:
    http://dev.w3.org/html5/markup/input.number.html

    That's fun.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  6. #5
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    yeah, even though some browsers (mostly mobile browsers) recognize it, they're still mostly limited to things like specialized controls. I don't believe any browser currently supports validation, for example.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •