I have this input box wrapped in php code. (I've only pasted the portion of that php code.)
<?php
case 'email':
$html .= '
<input name="s" id="s" value="Email..." type="text" size="18" value="'.esc_html($var['default']).'" name="'.esc_attr($opt).'" id="'.esc_attr($opt).'" class="mc_input"/>';
break;
?>
And I would like to add this javascript into the input form
onfocus="if (this.value == 'Search...') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search...';}
So, the newb that I am, I tried this and got a syntax error
<input name="s" id="s" onfocus="'.if (this.value == 'Search...') {this.value = '';}.'" onblur="'.if (this.value == '') {this.value = 'Search...';}.'" value="Email..." type="text" size="18" value="'.esc_html($var['default']).'" name="'.esc_attr($opt).'" id="'.esc_attr($opt).'" class="mc_input"/>';
Any ideas how to properly integrate this javascript code into PHP?
Thanks in advance