[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.tools.pdt] Re: PHP inside of Javascript in a .php file
|
Nick Boldt wrote:
>
>
> Micah wrote:
>> if (parentValue)
>> {
>> <?php echo $function;?>
>> }
>
> What is the value of $function?
The name of a xajax function. This is while editing, not running that I
get the error.
>
>> gives me these errors:
>> Multiple annotations found at this line:
>> - Syntax error on token "<", invalid Expression
>> - Syntax error on token "?", invalid Expression
>> - Syntax error on token ">", FullPostfixExpression expected after
>> this
>> token
>> - Syntax error on token "echo", : expected
>> - syntax error, unexpected 'EOF'
>>
>> It seems like the Javascript parser has trouble with the PHP inside the
>> javascript, even though the javascript is in a PHP file.
>
> You might want to open a bug against PDT (or maybe this is a DLTK
> issue?) explaining what you've tried and what workarounds (if any) work
> to clear the reported errors.
I'll have to do that. I just wanted to make sure that I wasn't missing
a config setting before filing a bug.
>
> Sounds like there are parser usecases not yet implemented.
>
> Have you tried doing your javascript in a separate file so that it can
> be parsed w/ a JS editor, rather than a PHP editor?
>
I have pure Javascript functions in a separate file, but it happens to
be that 65% of this function is generated from PHP variables, so I am
outputting it inline.
Thanks,
Micah