
243
Accessing the Code Directly
6
FIGURE 6-34
The generous Script dialog box provides plenty of room for modifying your JavaScript or VBScript.
Script Property inspector
When you choose JavaScript or VBScript as your Language type, Dreamweaver writes the code
accordingly. Both languages use the
<script> tag pair, and each is specified in the language attri-
bute, as follows:
<script language=”JavaScript”>alert(“Look Out!”)</script>
With Dreamweaver, you are not restricted to inserting code in just the <body> section of your Web
page. Many JavaScript and VBScript functions must be located in the
<head> section. To insert
this type of script, first choose View ➪ Head Content or, from the Options menu of the toolbar,
select Head Content. Next, select the now visible
<head> window and choose Insert ➪ Invisible
Tags ➪ Script, or click the Insert Script object. Enter your script as described earlier in this section
and then select the main Document window, or choose View ➪ Head Content again to deselect it.
82523c06.indd 243 2/19/09 8:57:52 AM