HTML sublanguage

HTML sublanguage

2
NewbieNewbie
2

    Mar 09, 2006#1

    Hi,

    I'm using 11.20b to edit HTML files that contain VBScript.

    The Help file states that JavaScript is detected as a sublanguage for highlighting. Should this also be true for VbScript as well?

    If so, is there a specific <SCRIPT language> construct needed in the HTML for UltraEdit to recognise the code as VBScript and not as JavaScript or should it be using the VBSCRIPT_LANG keyword area?
    (I've modded the ASP_LANG keyword to VBSCRIPT_LANG and this has no effect. I've tried moving the VBS file extension from the VB section and adding to the HTML file extension, no effect. I've tried adding the VBS file extension to the ASP_LANG keyword section, no effect.)

    Also, if I edit a .VBS file and have VBS added to the ASP_LANG file extensions the code is highlighted correctly but only if the case is an extact match of the words. That is, 'If' is highlighted in green, but 'IF' or 'if' isn't highlighted at all. The Nocase keyword present in the ASP_LANG section is being ignored. :!: (If I remove VBS from the file extensions then no highlighting occurs so it is using the section).

    :roll:

    6,687587
    Grand MasterGrand Master
    6,687587

      Mar 09, 2006#2

      I never have seen a HTML file with vbscript but I was able to find within 1 minute with Google how to correctly put VBScript code into a HTML document - see VBScript How To ....

      So if you put your code with

      <script type="text/vbscript">
      ... vbscript code ...
      </script>

      in your HTML files UltraEdit will recognize it and will use /L10"VBScript Active Server Pages" for this section. Undo all changes you have done in the wordfile because default wordfile has the correct settings.
      Best regards from an UC/UE/UES for Windows user from Austria

      2
      NewbieNewbie
      2

        Mar 09, 2006#3

        I'd been spending too long on this so I deleted the wordfile.txt and reinstalled UE so I had an original file and started from there.

        I found that UE expects the vbscript construct to be quoted that is,
        <SCRIPT language="vbscript">. This then meant that the ASP_LANG section was now activated correctly with highlighting using the default wordfile.txt.
        I moved the VBS file extension into the ASP_LANG so that the same highlighting is applied to both .VBS files and HTML files containing vbscript (I also updated the ASP_LANG keywords list) for consistancy.
        So the problem was a combination of missing quotes in the HTML code and I guess operator error that had broken the wordfile.txt somewhere. :)