|
Posted by Kimmo Laine on 10/30/06 10:54
"Andrey Koptyaev" <koptyaev@gmail.com> wrote in message
news:1162188640.844891.280260@e64g2000cwd.googlegroups.com...
>
> Colin Fine wrote:
>> Andrey Koptyaev wrote:
>> > What does it mean "fieldRequired.lenght" in php 4.1 ?
>> > I know "fieldRequired->lenght" but don't know "fieldRequired.lenght"
>> > Please help to understand.
>> > Thank you!
>> >
>>
>> '.' is the string concatenation operator, but neither 'fieldRequired'
>> nor 'lenght' appear to be variables.
>>
>> Can you give us some context?
>>
>> Colin
>
> here:
>
> function formCheck(formobj){
> // Enter name of mandatory fields
> var fieldRequired = Array("title", "category", "description",
> "regnow_id", "vid");
> // Enter field description to appear in the dialog box
> var fieldDescription = Array("<?=$GLOBALS['_TITLE']?>",
> "<?=$GLOBALS['_DESC']?>", "<?=$GLOBALS['_CATEG']?>",
> "<?=$GLOBALS['_RNID']?>", "<?=$GLOBALS['_VENDOR']?>");
> // dialog message
> var alertMsg = "<?=$GLOBALS['_ERR11']?>\n";
>
> var l_Msg = alertMsg.length;
>
> for (var i = 0; i < fieldRequired.length; i++){
> var obj = formobj.elements[fieldRequired[i]];
>
That's javascript mixed with some php. In your example code everything
between the <? ?> tags is php, anything outside them is javascript. In this
case fieldRequired.length is a javascript command. To be precide, it refers
to a string object 'fieldRequired' and it's class member 'length'.
Ask in a javascript group.
--
"Ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" - lpk
http://outolempi.net/ahdistus/ - Satunnaisesti pδivittyvδ nettisarjis
spam@outolempi.net | rot13(xvzzb@bhgbyrzcv.arg)
Navigation:
[Reply to this message]
|