|
Posted by Kimmo Laine on 07/05/06 15:58
Derek @ Blueyonder kirjoitti:
>>> Hi
>>>
>>> Good one, that is working fine. And yes checking the source html it was
>>> different to what was shown on the screen. Very strange.
>> What's strange about browser not being able to display incorrect html? If
>> the code is corrupted like in this case it was, no wonder the browser
>> cannot correctly display it. That's why you should always alwasy make sure
>> the html your script produces is accurate, to make sure it's displayed
>> correctly.
>>
>>
>> --
>> "ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" -lpk
>> spam@outolempi.net | Gedoon-S @ IRCnet | rot13(xvzzb@bhgbyrzcv.arg)
>>
>
> You are correct, wrong HTML and the results will be unpredictable.
>
> Now that I understand what I was doing wrong I have applied the same process
> to a text area but this will not display any text at all, code below.
>
Textareas have no value attribute, instead, the value is placed between
the textarea tags like this:
echo ("<td colspan='2'><textarea name='extract' cols='100' rows='5'>" .
$myrow[3] . "</textarea></td>");
>
> Are text areas treated in a different way?
>
> Any finaly if I may checkboxes, can values be loaded into them in the same
> sort of way as you explained above? The code is
>
> echo ("<td width='427'><input type='checkbox' name='childhood' value=" .
> $myrow[27] ."></td>");
Yes indeed, that works. In case you sometimes need to checkbox checked
by default just insert the checked="checked" attribute in the tag.
Here's something you might find interesting:
http://www.w3.org/TR/html4/interact/forms.html the complete html 4.01
specification regarding forms.
--
"En ole paha ihminen, mutta omenat ovat elinkeinoni." -Perttu Sirviö
spam@outolempi.net | Gedoon-S @ IRCnet | rot13(xvzzb@bhgbyrzcv.arg)
Navigation:
[Reply to this message]
|