Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Warning i error
dk1342
post
Post #1





Grupa: Zarejestrowani
Postów: 275
Pomógł: 9
Dołączył: 24.07.2008
Skąd: Racibórz

Ostrzeżenie: (10%)
X----


Witam mam taki kod:

Kod
<a href="#" onclick="document.getElementById('box_maptext').rows = document.getElementById('box_maptext').rows + 5; return false;">Powiększ</a> <a href="#" onclick="document.getElementById('box_maptext').rows = document.getElementById('box_maptext').rows - 5; return false;">Pomniejsz</a>
</td>
</tr>
<br>
</tbody></table>
<textarea id="box_maptext" name="maptext" style="width: 50%;" rows="8" wrap="off"></textarea>


i wszystko bardzo ładnie działa, tylko zaczyna się problem gdy wsadzam to do php:
Kod
echo '<a href="#" onclick="document.getElementById('\box_maptext'\).rows =

document.getElementById('\box_maptext'\).rows + 5; return false;">Powiększ</a> <a href="#"

onclick="document.getElementById('\box_maptext'\).rows = document.getElementById('\box_maptext'\).rows - 5;

return false;">Pomniejsz</a>';


to już jest error i warning:

Kod
[b]Warning[/b]:  Unexpected character in input:  '\' (ASCII=92) state=1 in [b]/home/accounts_d/dk1342/public_html/podstrony/editindex.php[/b] on line [b]61[/b]

[b]Parse error[/b]:  syntax error, unexpected T_STRING, expecting ',' or ';' in [b]/home/accounts_d/dk1342/public_html/podstrony/editindex.php[/b] on line

co źle zrobiłem ?
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 15:17