Page 1 of 1

javascript inside aspx files

Posted: Fri Aug 15, 2008 3:40 am
by rogerr
So, I'm using spket and I'm liking it alot.
Problem is, there are some bits of javascript code that have to live in .aspx files, rather than in .js files.

I can tell tiny-eclipse to open these files with the spket javascript editor, and it does. It reports lots of syntax errors for code outside of the (javascript) <script> blocks, and I can mostly ignore those.

It even knows about intellisense that I add via the javascript profile (in my case, ExtJS stuff), which is pretty cool.

But, for my local code, I include a tag like

//@include "manifest.js"

at the beginning of the file to get intellisense for all the files included in the specified manifest. The thing is, since this is an aspx file, I need to
use some different kind of comment to include the manifst.
Something like

<%--//@include "manifest.js" --%>

And here is where spket doesn't cope. It only seems to recognize the manifest file include if the it is the first non-whitespace thing in the file.

It would be way cool if spket just ignored everything outside of the client side script blocks, and would recognize //@include anyplace inside a client side script block.

Thanks for listening.