Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Javascript RegExp

Status
Not open for further replies.

JBrooksUK

Programmer
Mar 23, 2009
2
GB
Hey everyone,

I used to know Javascript but I have not used it for a while, because of this, I have forgotten alot!

I am currently trying to add a real time preview to my comments system (PHP). I have already managed to get smilies to appear in the textarea however I would like to convert the ":) etc" into the correct image.

I did at one stage have it so that "," would convert to a smile, however I forgot to save and lost it.

My current code is attached (link to website).

So my real question is, could someone show me how to make ":)" become the correct smiley image in the realtime div layer like HTML?

Thanks,
James
 
Nevermind, I have fixed it. I needed to use a buffer, which is sent back and forward everytime I add another smiley.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top