MACROMEDIA DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER Spécifications Page 115

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 504
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 114
Using custom UI controls in extensions 115
The following example creates a Command extension that contains an editable select list
using common JavaScript functions:
To create the example:
1. Create a new blank file in a text editor.
2. Enter the following code:
<html>
<head>
<title>Editable Dropdown Test</title>
<script language="javascript">
function getAlert()
{
var i=document.myForm.mySelect.selectedIndex;
if (i>=0)
{
alert("Selected index: " + i + "\n" + "Selected text " +
document.myForm.mySelect.options[i].text);
}
else
{
alert("Nothing is selected" + "\n" + "or you entered a value");
}
}
function commandButtons()
{
return new Array("OK", "getAlert()", "Cancel", "window.close()");
}
</script>
</head>
<body>
<div name="test">
<form name="myForm">
<table>
<tr>
<td colspan="2">
<h4>Select your favorite</h4>
</td>
</tr>
<tr>
<td>Sport:</td>
<td>
<select name="mySelect" editable="true" style="width:150px"
editText="Editable Text">
<option> Baseball</option>
<option> Football </option>
<option> Soccer </option>
Vue de la page 114
1 2 ... 110 111 112 113 114 115 116 117 118 119 120 ... 503 504

Commentaires sur ces manuels

Pas de commentaire