Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Long lines

Reply
Thread Tools

Long lines

 
 
=?iso-8859-2?Q?Pawe=B3?=
Guest
Posts: n/a
 
      04-08-2004
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)\">
 
Reply With Quote
 
 
 
 
brucie
Guest
Posts: n/a
 
      04-08-2004
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
 
Reply With Quote
 
 
 
 
brucie
Guest
Posts: n/a
 
      04-08-2004
in post: <news:c53ig9$2oqpos$>
brucie <****@bruciesusenetshit.info> 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
 
Reply With Quote
 
Mitja
Guest
Posts: n/a
 
      04-08-2004
"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.


 
Reply With Quote
 
=?iso-8859-2?Q?Pawe=B3?=
Guest
Posts: n/a
 
      04-09-2004
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???
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Having compilation error: no match for call to ‘(const __gnu_cxx::hash<long long int>) (const long long int&)’ veryhotsausage C++ 1 07-04-2008 05:41 PM
Use of Long and Long Long Bart C C Programming 27 01-15-2008 05:27 AM
long long and long Mathieu Dutour C Programming 4 07-24-2007 11:15 AM
unsigned long long int to long double Daniel Rudy C Programming 5 09-20-2005 02:37 AM
Assigning unsigned long to unsigned long long George Marsaglia C Programming 1 07-08-2003 05:16 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57