Nvu User Guide - Section 5
Scripts are short programs that are included in HTML documents (and consist of alphanumeric and other characters) which can change the presentation of pages in some way. Scripts must be written in an appropriate script language but this does not form part of the HTML specification. Support for scripting language depends on the browser and/or server employed.
The most common scripting language is probably JavaScript. It runs on the browser and most modern browsers provide support but this can sometimes be disabled if desired by the visitor.
Another common script is PHP. This runs on and depends on
support
provided by the server. When including PHP code authors should use the
fuller tags e.g. <? php … ?>
and not the short tags <? … ?> which
Nvu does not support.
Nvu allows the use of scripts on pages but does not respond to them. The effect of the script will not be seen on the Normal, HTML Tags or Preview view (but the code will of course appear in Source view).
To see the code at work click on ‘Browse’.
Note Some scripts include 'special characters' which, when encoded by Nvu, result in errors when the script runs. To avoid this, in Tools > Preferences > Advanced, check the box 'Don't encode special characters in attribute values'. You can find more in formation about this in Appendix 6
The ‘Insert’ menu does offer one piece of JavaScript, a calendar. When you click it nothing appears to happen until you save and run your file on a browser when the calendar appears!.
In the menu there is a command Tools > Web Development – This Guide does not cover this.
Note If your page refuses to save after inserting the Calendar widget use the “Save as” command.