|
Posted by Andrey Koptyaev on 10/30/06 17:34
Pedro Graca wrote:
> Andrey Koptyaev wrote:
> > 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
>
> No PHP so far
>
> > var fieldDescription = Array("<?=$GLOBALS['_TITLE']?>",
> > "<?=$GLOBALS['_DESC']?>", "<?=$GLOBALS['_CATEG']?>",
> > "<?=$GLOBALS['_RNID']?>", "<?=$GLOBALS['_VENDOR']?>");
> > // dialog message
> > var alertMsg = "<?=$GLOBALS['_ERR11']?>\n";
>
> Only stuff between <? and ?> (6 things) is, probably (*), PHP.
> All the rest isn't; and also there is no more PHP below.
>
> > var l_Msg = alertMsg.length;
> >
> > for (var i = 0; i < fieldRequired.length; i++){
> > var obj = formobj.elements[fieldRequired[i]];
>
> I suggest you ask in a newsgroup that deals with this language, whatever
> it is :)
>
>
> (*) It is PHP if your server is configured with short_open_tags.
> Rather than rely on a specific server configuration, it's best to code
> that as
>
> <?php echo $variable; ?>
>
> which will work on every server with PHP installed (and configured to
> 'run' on files with the extension this snippet is in).
ok
thank you
I understand - this is javascript with little bit php
[Back to original message]
|