• Post Reply Bookmark Topic Watch Topic
  • New Topic

Adding smilies dynamically to web page

 
Murali Mohan
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am building a Discussion forum in which I have to add smilies dynamically to web page. How to do it. Please tell me if any one knows it.
Thanks,
Murali
 
jyothsna kumari
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hia,
can u explain me what do u mean by dynamically
i.e what is the way in which u want add smileys.
jyothsna
 
Murali Mohan
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Thanks to your reply. Anyway I got it. Actually I wanted to do in a manner similar to our Javaranch "Add New Topic " screen. Now I got the logic.
But problem is how to store them and display. If anyone one knows please tell me.
Thanks,
Murali
 
Praful Thakare
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
testing.... raful :testing
Hi,I just tried some stuff displayed above.And after looking at source code of current page This is what i can guess
Approch 1)
Store the text in ur database as it is and while displaying the text
parse it for any entries of : followed by one character or : followed by
2+ characters and ended by : and if u find any valid combination then just replace it with <img src=...> tag.
Approch 2)
Parse the input before storing in data base and replace ur :char combination with <img > tag
hope this helps u
feel free to say if I m confusing, I will try to be more clear.
cheers
[ November 05, 2003: Message edited by: Praful Thakare ]
[ November 05, 2003: Message edited by: Praful Thakare ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!