Em Andamento

PHP error cause by javascript

This code works for a search box on our website:

<table bgcolor="#F2F5FA" cellspacing="0" cellpadding="0" border="0">

<tr><td>

<form style="margin:0;" method="get" action="http://www.picosearch.com/cgi-bin/ts.pl">

<input type="hidden" name="index" value="434642" />

<table bgcolor="#F2F5FA" cellspacing="2" cellpadding="0" border="0">

<tr>

<td></td>

<td>

<input type="text" name="query" value="type here" size="15"/>

</td>

</tr>

<tr>

<td></td>

<td><span style="white-space: nowrap;">

<input type="submit" value="Search" name="search" />

</span></td>

</tr>

</table>

</form>

</td></tr></table>

I'd like to use the following code so that the words "type here" will disappear when the customer clicks in the search box:

<input type="text" name="query" value="type here" size="15" onfocus="if (this.defaultValue==[url removed, login to view]) this.value='';"/>

However, this code causes a PHP error as follows:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /usr/local/psa/home/vhosts/[url removed, login to view] on line 34

Habilidades: Javascript, PHP

Ver mais: table customer, php style, syntax, span, php co, input method, home value, error, error php, d bin, border, parse table javascript, form submit php, parse error parse error, parse table, php search box, parse search, php customer form, customer name error, text javascript, http javascript, parse javascript, website error, table php, javascript text

Acerca do Empregador:
( 92 comentários ) Dun Laoghaire, United Kingdom

ID do Projeto: #150840

Premiar a:

keyboard999

Working out now.

$30 USD em 0 dias
(121 Avaliações)
6.5

7 freelancers estão ofertando em média $30 para este trabalho

TakeReal

I can fix error right now. Escrow deposit is required, please.

$30 USD in 0 dias
(1291 Comentários)
7.5
NickolaS

Hi, please, check your PM

$30 USD in 0 dias
(337 Comentários)
7.5
bruzli2005

Ready & Available to fix this problem.

$30 USD in 0 dias
(132 Comentários)
7.1
drailean

hello, please check the PM

$30 USD in 0 dias
(197 Comentários)
6.6
bendriss

Hello; I can fix immediatly, just with 24$, please see pm;

$30 USD in 0 dias
(14 Comentários)
4.3
GafSanvera

plz check pmb.

$30 USD in 0 dias
(7 Comentários)
3.6