views:

64

answers:

3

I'm using the Zend Framework's javascript helpers of the form:

<?php $this->headScript()->captureStart(); ?>
//Javascript here
<?php $this->headScript()->captureEnd(); ?>

//Rest of view here

The problem is that Netbeans keeps complaining about code problems in the block, because it thinks it's an HTML, rather than a Javascript, block. Plus syntax coloring is broken.

Netbeans already has special comment hinting which you can use to apply a type to a variable when it can't be resolved by Netbeans automatically to tell it that we're writing Javascript in that range, rather than HTML?

A: 

I was actually just reading about this yesterday in their blog:

Their HTML in PHP parsing has been flaky, especially with indenting incorrectly short/alternate form code, but the latest nightly builds (I presume those after 201010060000) have improvements in that area. I haven't tried it yet but give it a shot.

Fanis
This is about how PHP tags are handled in general -- it doesn't tell Netbeans anything about Javascript.
Billy ONeal