First, do not crosspost over top hierarchies. X-Post removed.
Second, do not try to arouse interest in your postings by writing the
Subject only in uppercase letters and/or with multiple sentence marks.
More people will be repelled than attracted by such a Subject header.
Third:
| [03:29:31] pointedears:~ $ host -t mx kkjkjkjij.it
| Note: nslookup is deprecated and may be removed from future releases.
| Consider using the `dig' or `host' programs instead. Run nslookup
| with the `-sil[ent]' option to prevent this message from appearing.
| Server: 62.53.246.30
| Address: 62.53.246.30#53
|
| ** server can't find kkjkjkjij.it: NXDOMAIN
By using a faked e-mail address you prevent you from getting
spam, but at the same time you help to destroy the Internet.
Due to the egotistical behavior you display with such, I will
not download your postings anymore until you change that. See
<http://www.interhack.net/pubs/munging-harmful/> for details.
Andrea Gelsogroove wrote:
[color=blue]
>
http://dev.shipco.com/temp/div.html[/color]
http://validator.w3.org/check?uri=ht.../temp/div.html
[color=blue]
> <form Action ="Save.php?ID=106" Name="input1" Method = Post
> Onsubmit="return Checkform(this);">[/color]
<form action="Save.php?ID=106" name="input" method="post"
onsubmit="return Checkform(this);"
Watch for the case in URIs. Is the filename really `Save.php' or
is it `save.php' instead? Most servers are not using FAT or NTFS
file systems, thus filename case is important.
Watch for the case in attribute and JavaScript identifiers, too.
Lowercased identifiers are not only better compressible, they
also save you trouble in case-sensitive applications like XHTML
and JavaScript. For JavaScript, only identifiers of constructor
functions should start with an uppercase character, to avoid
confusion.
[color=blue]
> <div id="prova"></div>
>
> <table width=100% border="0" align="center" cellpadding="3"
> cellspacing="1" >
>
> <script>[/color]
The above is all invalid HTML. Write at least
<table width="100%" border="0" align="center" cellpadding="3"
cellspacing="1">
and
<script type="text/javascript">
(But `script' *must* *not* be a child of `table', see below.)
[color=blue]
> function htmlwrite()
>
>
> buildHTML= "<input type=text><br>"[/color]
ŽbuildHTML' is unnecessarily declared global here.
Use the `var' keyword to make it a local variable.
`type="text"' is the default, you can safely omit it.
[color=blue]
> elem = document.getElementById('prova');[/color]
Again, `elem' need not and should not be declared global *in*
*general*. However, for this is a method called more than once
and operating on the same object, `elem' should be global and
hold the reference to the HTMLDivElement Object so that it
should not be retrieved every time the function is called.
But more important, document.getElementById(...) is a method
of the W3C-DOM and you do not check for support of it before
accessing it. See
http://pointedears.de.vu/scripts/test/whatami
for details.
[color=blue]
> elem.innerHTML = elem.innerHTML + buildHTML;[/color]
OTOH `innerHTML' is a proprietary property *not* part of the
W3C-DOM. Although supported in the HTML-DOM of recent user
agents, you should stick to one object model because of the
reasons mentioned in the test case document and because of the
problems that will arise otherwise if you possibly change the
DOCTYPE to XHTML.
Quickhack:
var oProva = null; // was `elem' previously
if (document.getElementById) // possibly W3C-DOM compliant
oProva = document.getElementById('prova');
else if (document.all) // possibly IE4-DOM compliant
oProva = document.all['prova'];
// Using the argument `o' for passing the reference
// makes the function more independent of the context
// it is called from.
function htmlWrite(o)
{
if (o)
{
if (document.createElement && o.appendChild)
{
var oInput = document.createElement("input");
if (oInput)
{
oInput.type = "text";
if (o.appendChild(oInput))
{
var oBr = document.createElement("br");
if (oBr)
{
o.appendChild(oBr);
}
}
}
}
else if (typeof o.innerHTML != "undefined")
{
o.innerHTML += "<input><br>\n";
}
}
}
[color=blue]
> }
> </script>
> </TD></TR>[/color]
That is like my recent example of how `script' elements can be misplaced
while creating invalid HTML. The `script' element must not be the child
element of the `table' element, only `tbody', `thead', `tfoot', `th' and
`td' may be. The `script' element, however, has nothing to do with the
`table' element, thus it should be the child of the `head' element so
that the function is early available.
[color=blue]
> <tr>
> <td align=center colspan=2>
> <input type=button class=button name=add
> onClick="javascript
:htmlwrite();" value = "Add TEXT FIELD">[/color]
Once you define the default scripting language standards-compliant with
<meta http-equiv="Content-Script-type" content="text/javascript">
within the `head' element you do not longer require proprietary
extensions like this. `javascript
:' is basically a proprietary URI
scheme. Using it in presumed JavaScript code makes it only a label.
Only the IE browser component reads this label to define the used
scripting language, other UAs do not and will even trigger script
errors if labels are not supported (in event handlers). Write
<input type="button" name="add" value="Add TEXT FIELD" class="button"
onclick="htmlWrite(oProva);"> <!-- pass a reference as arg. -->
instead. Note that users without JavaScript cannot use that
button, so you should provide a working alternative for them.
[color=blue]
> </td>
> </tr>
> <Table>[/color]
The last tag should be the close tag </table>. But you will not
want nor need a table here. Never use a `table' element for layout
purposes only. A table is a table is a table [psf 3.8], and CSS
exists.
HTH
PointedEars