Hi, all.
I need help.
I use search form and want to use onFocus=’if(this.value=="Логин")this.value="";’ onBlur=’if(this.value=="")this.value="Логин";’ for input as:
<?php
if($_GET["id"]!=6){
echo ’
<form name="ValidCheck" method="POST" action="./index.php?id=79" id="FormSearchCheck">
<table><tr><td><input class="BlockSearchInput" type="text" name="NubbChk" id="NumChkInput" value="Введіть номер серії" id="firstname" name="firstname" tooltipText="В це поле потрібно вписати номер серії, який Ви знайдете на упаковці." onFocus=’if(this.value=="Логин")this.value="";’ onBlur=’if(this.value=="")this.value="Логин";’ /></td><td><input type="image" src="[(site_url)]/assets/templates/medpotreb.org/images/button_search.png" name="ChkForm" id="ChkForm"></td></tr></table>
<form>
’;
}
?>
but
Parse error: syntax error, unexpected T_STRING, expecting ’,’ or ’;’ in /var/www/medpotreb/medpotreb.org/manager/includes/document.parser.class.inc.php(770) : eval()’d code on line 4
Hi, try to escape the ’ before onBlur.
Like this : \’
just add \ before ’
It’s don’t work. Search is work with this code, but do not work "onFocus".
It might be easier to just use " on the outside and escape all the quotes (both kinds) inside.
What code do you see when you do "view source" ?