Long lines

Discussion in 'HTML' started by =?iso-8859-2?Q?Pawe=B3?=, Apr 8, 2004.

  1. I have a few long lines (like these below) and I would like to make them
    shorter.
    Any ideas how can I do this??


    <input size=1 class=\"Unspecified\" maxLength=3 id=SIP1 name=\"SIP1\"
    onblur=\"IPcheck(this)\">
    <input size=1 class=\"Unspecified\" maxLength=3 id=SIP2 name=\"SIP2\"
    onblur=\"IPcheck(this)\">
    <input size=1 class=\"Unspecified\" maxLength=3 id=SIP3 name=\"SIP3\"
    onblur=\"IPcheck(this)\">
    <input size=1 class=\"Unspecified\" maxLength=3 id=SIP4 name=\"SIP4\"
    onblur=\"IPcheck(this)\">
     
    =?iso-8859-2?Q?Pawe=B3?=, Apr 8, 2004
    #1
    1. Advertising

  2. =?iso-8859-2?Q?Pawe=B3?=

    brucie Guest

    in post: <news:>
    Pawe³ <> said:

    > I have a few long lines (like these below) and I would like to make them
    > shorter. Any ideas how can I do this??


    i think this wins weird question of the week

    > <input size=1 class=\"Unspecified\" maxLength=3 id=SIP1 name=\"SIP1\" onblur=\"IPcheck(this)\">
    > <input size=1 class=\"Unspecified\" maxLength=3 id=SIP2 name=\"SIP2\" onblur=\"IPcheck(this)\">


    delete the spaces
    delete size. use css
    delete maxlength. (normal form validation should pick it up)
    use ' so you don't have to escape " but quote all attributes
    use descendent selectors instead of repeating classes
    rethink your use of JS
    if byte size is an issue when sending use http compression

    thats about all i can think of off the top of my head, it would help if
    you described what you want to do and why the hell the length of the
    markup is an issue.

    --
    b r u c i e
     
    brucie, Apr 8, 2004
    #2
    1. Advertising

  3. =?iso-8859-2?Q?Pawe=B3?=

    brucie Guest

    in post: <news:c53ig9$2oqpos$-berlin.de>
    brucie <> said:

    >> <input size=1 class=\"Unspecified\" maxLength=3 id=SIP1 name=\"SIP1\" onblur=\"IPcheck(this)\">


    > delete the spaces
    > delete size. use css
    > delete maxlength. (normal form validation should pick it up)
    > use ' so you don't have to escape " but quote all attributes
    > use descendent selectors instead of repeating classes
    > rethink your use of JS
    > if byte size is an issue when sending use http compression
    >
    > thats about all i can think of off the top of my head, it would help if
    > you described what you want to do and why the hell the length of the
    > markup is an issue.


    forgot to say....

    if this is just an IP checking thingy then all you need and which is
    much better is a single input for the visitor to type the IP so they
    don't have to stuff around dealing with 4 separate inputs. KISS

    --
    b r u c i e
     
    brucie, Apr 8, 2004
    #3
  4. =?iso-8859-2?Q?Pawe=B3?=

    Mitja Guest

    "Pawe³" <> wrote in message
    news:...
    > I have a few long lines (like these below) and I would like to make them
    > shorter.
    > Any ideas how can I do this??
    >
    >
    > <input size=1 class=\"Unspecified\" maxLength=3 id=SIP1 name=\"SIP1\"
    > onblur=\"IPcheck(this)\">
    > <input size=1 class=\"Unspecified\" maxLength=3 id=SIP2 name=\"SIP2\"
    > onblur=\"IPcheck(this)\">
    > <input size=1 class=\"Unspecified\" maxLength=3 id=SIP3 name=\"SIP3\"
    > onblur=\"IPcheck(this)\">
    > <input size=1 class=\"Unspecified\" maxLength=3 id=SIP4 name=\"SIP4\"
    > onblur=\"IPcheck(this)\">


    Since you're using JS anyway, you could generate them with document.write()
    and a for loop. OK, doesn't make the lines shorter, but reduces overall size
    if number of lines is big enough.
     
    Mitja, Apr 8, 2004
    #4
  5. On Thu, 8 Apr 2004 23:02:46 +1000, brucie wrote:

    > in post: <news:>
    > Pawe³ <> said:
    >
    >> I have a few long lines (like these below) and I would like to make them
    >> shorter. Any ideas how can I do this??

    >
    > i think this wins weird question of the week
    >
    >> <input size=1 class=\"Unspecified\" maxLength=3 id=SIP1 name=\"SIP1\" onblur=\"IPcheck(this)\">
    >> <input size=1 class=\"Unspecified\" maxLength=3 id=SIP2 name=\"SIP2\" onblur=\"IPcheck(this)\">

    Is there any way to specify the
    -size
    -class
    -maxLength
    -onblur
    values for all lines just once???
     
    =?iso-8859-2?Q?Pawe=B3?=, Apr 9, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. George Marsaglia

    Assigning unsigned long to unsigned long long

    George Marsaglia, Jul 8, 2003, in forum: C Programming
    Replies:
    1
    Views:
    747
    Eric Sosman
    Jul 8, 2003
  2. Daniel Rudy

    unsigned long long int to long double

    Daniel Rudy, Sep 19, 2005, in forum: C Programming
    Replies:
    5
    Views:
    1,246
    Peter Shaggy Haywood
    Sep 20, 2005
  3. Mathieu Dutour

    long long and long

    Mathieu Dutour, Jul 17, 2007, in forum: C Programming
    Replies:
    4
    Views:
    517
    santosh
    Jul 24, 2007
  4. Bart C

    Use of Long and Long Long

    Bart C, Jan 9, 2008, in forum: C Programming
    Replies:
    27
    Views:
    853
    Peter Nilsson
    Jan 15, 2008
  5. veryhotsausage
    Replies:
    1
    Views:
    1,899
    veryhotsausage
    Jul 4, 2008
Loading...

Share This Page