|
Posted by Andrey Koptyaev on 10/30/06 17:32
Kimmo Laine wrote:
> "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.
ok
thank you
I am going to teach some java :-)
[Back to original message]
|