Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Closed TopicStart new topic
> [php] Skrypt forum JS PHP
Mlodycompany
post 25.04.2008, 22:45:07
Post #1





Grupa: Zarejestrowani
Postów: 910
Pomógł: 44
Dołączył: 20.02.2008
Skąd: Łódź

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


Witam. Pewnie coniektórzy wiedzą już, że chce zrobić własne forum. Napotkałem pewien problem.
  1. <?php
  2. <table class=tabela cellpadding="1" cellspacing="1" align="center" border="0">
  3. <tr class=naglowek3>
  4. <th width=200>Emotikony</th><th>Treść</th>
  5. </tr>
  6. <tr>
  7. <th valign=top><table class=tabela2 cellpadding="1" cellspacing="1">
  8. <tr>
  9. <th><img src="images/smiles/icon_arrow.gif"></th>
  10. <th><img src="images/smiles/icon_cool.gif"></th>
  11. <th><img src="images/smiles/icon_eek.gif"></th>
  12. <th><img src="images/smiles/icon_idea.gif"></th>
  13. </tr>
  14. <tr>
  15. <th><img src="images/smiles/icon_mrgreen.gif"></th>
  16. <th><img src="images/smiles/icon_razz.gif"></th>
  17. <th><img src="images/smiles/icon_sad.gif"></th>
  18. <th><img src="images/smiles/icon_surprised.gif"></th>
  19. </tr>
  20. <tr>
  21. <th><img src="images/smiles/icon_biggrin.gif"></th>
  22. <th><img src="images/smiles/icon_cry.gif"></th>
  23. <th><img src="images/smiles/icon_evil.gif"></th>
  24. <th><img src="images/smiles/icon_lol.gif"></th>
  25. </tr>
  26. <tr>
  27. <th><img src="images/smiles/icon_neutral.gif"></th>
  28. <th><img src="images/smiles/icon_redface.gif"></th>
  29. <th><img src="images/smiles/icon_smile2.gif"></th>
  30. <th><img src="images/smiles/icon_twisted.gif"></th>
  31. </tr>
  32. <tr>
  33. <th><img src="images/smiles/icon_confused.gif"></th>
  34. <th><img src="images/smiles/icon_curve.gif"></th>
  35. <th><img src="images/smiles/icon_exclaim.gif"></th>
  36. <th><img src="images/smiles/icon_mad.gif"></th>
  37. </tr>
  38. <tr>
  39. <th><img src="images/smiles/icon_question.gif"></th>
  40. <th><img src="images/smiles/icon_rolleyes.gif"></th>
  41. <th><img src="images/smiles/icon_smile.gif"></th>
  42. <th><img src="images/smiles/icon_wink.gif"></th>
  43. </tr>
  44. </table></th>
  45. <th valign=top><textarea name=tresc rows="15" cols="35"></textarea></th>
  46. </tr>
  47. </table>');
  48. ?>

Mam taki skrypt do odpowiadania. Chciałbym tak zrobić, aby user klikał na emotikona i ten emot dodawał się do formularza tak jak jest na wielu forach. Wiem, że to będzie JS ale JSa kompletnie nie znam więc proszę o pomoc.
Go to the top of the page
+Quote Post
lord_t
post 26.04.2008, 08:57:43
Post #2





Grupa: Zarejestrowani
Postów: 603
Pomógł: 131
Dołączył: 24.07.2007
Skąd: Górny Śląsk

Ostrzeżenie: (0%)
-----


Poczytaj o zdarzeniu onClick, które możesz nadać np obrazkowi.
Podpowiedź druga:
Kod
document.getElementById('id_inputa_w_formularzu').innerHTML=this.src;
(^Kod pisany z palca.)


--------------------
Go to the top of the page
+Quote Post
Mlodycompany
post 26.04.2008, 09:09:19
Post #3





Grupa: Zarejestrowani
Postów: 910
Pomógł: 44
Dołączył: 20.02.2008
Skąd: Łódź

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


Już mam skrypt który dodaje emoty. Teraz jest inny problem, żeby pozamieniać ":D" na biggrin.gif.
Go to the top of the page
+Quote Post
phpion
post 26.04.2008, 09:12:26
Post #4





Grupa: Moderatorzy
Postów: 6 072
Pomógł: 861
Dołączył: 10.12.2003
Skąd: Dąbrowa Górnicza




str_replace" title="Zobacz w manualu PHP" target="_manual
Go to the top of the page
+Quote Post
Sabistik
post 26.04.2008, 09:12:51
Post #5


Administrator wortalu


Grupa: Przyjaciele php.pl
Postów: 960
Pomógł: 39
Dołączył: 21.10.2003
Skąd: Kraków

Ostrzeżenie: (0%)
-----


Zamykam, temat wielokrotnie wałkowany.

+warn za totalne lenistwo.
Go to the top of the page
+Quote Post

Closed TopicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 31.07.2025 - 10:52