e1seix
09-11-2007, 01:31 PM
what's wrong with this code that it is returning an error?
echo '<form action="/search.php" method="GET" style="margin-bottom:2px;margin-top:5px">';
echo '<input type="text" onfocus="this.value === this.defaultValue && (this.value = '')" onblur="this.value = this.value || this.defaultValue" name="search" style="width:95px" value="keyword search">';
echo '<input type="hidden" name="startrow" value="0">';
echo '<input type="submit" value="Go!">';
have a feeling it's to do with this [onfocus="this.value === this.defaultValue && (this.value = '')" onblur="this.value = this.value || this.defaultValue"] nested part of the code that empties the input box when clicked by the user?
echo '<form action="/search.php" method="GET" style="margin-bottom:2px;margin-top:5px">';
echo '<input type="text" onfocus="this.value === this.defaultValue && (this.value = '')" onblur="this.value = this.value || this.defaultValue" name="search" style="width:95px" value="keyword search">';
echo '<input type="hidden" name="startrow" value="0">';
echo '<input type="submit" value="Go!">';
have a feeling it's to do with this [onfocus="this.value === this.defaultValue && (this.value = '')" onblur="this.value = this.value || this.defaultValue"] nested part of the code that empties the input box when clicked by the user?