I am trying to compile the JQuery framework into my project. One of the things that happens is that I get compile errors. It appears that PBuilder is choking specific keywords that actually appear in the javascript code of the Jquery library.
Is there a list of these words and an easy way to escape them in javascript source code?
The error I get is
Description Resource Path Location Type
expected "=true", "=false", or nothing to follow keyword "MULTIPLE=MULTIPLE" in tag jquery-1.5.1.js HTTP CGI Project Template/web/webcontents/html/js/libs 5012 PBuilder Problem Marker
The offending line of javascript looks like this:
option: [ 1, "", "" ],
Any thoughts on work around? I can’t really change the javascript. I assuming there is an escape sequence that will make the compiler happy.
Hi,
add at begin of file and to the end of file. Also be aware of words defined in RpUsrDct.txt! Anything defined in RpUsrDct.txt makes me mess in web pages.
My answer is a little late relative to the original question and answer but I’d like to clarify the answer from kubiajir. kubiajir is about 80% correct. There is another 20% that will clean up the answer.
kubiajir suggested surrounding javascript used within an advanced web server (NET+OS development kit) based application with the following pbuilder comment tag pair:
(DZT being fort for DataZeroTerminated)
The intent is to tell the pbuilder utility to not modify HTML tags with pbuilder macros. The issue is that when the advanced web server goes to expand the macros, in some cases, a comment tag such as or might be replaced with (after expansion) with
or
.
Why is this an issue?
We have seen instances where, within a javascript script, the javascript wants to create a new HTML page for display through the browser. It will do this by using the document’s writeln method. The script will use a writeln method containing HTML tags. The problem is that pbuild will replace the HTML tags in the writeln with the macro. When expanded again, if a newline (
) was added, this will break the writeln method into two or three lines which the javascript interpreter within browsers is not happy about.
So how does one get around this or what is the missing 20%?
Add the RpParse attribute with a value of 0 to the RpDZT comment tag. Thus your comment tag pair surrounding the javascript code would look like the following:
my javascript code goes here
The RpParse attribute with a value of 0 tell pbuilder “Keep your hands off my javascript”.
1 Like