Matthew6437604
Posts: 0
Joined: Sat Nov 23, 2013 2:36 am

Hi I made a chat app and I want to make a clear message button to clear the screen of messages but not clear the databas

I cant find out how I would code that so it only clears the app not the database.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Hi I made a chat app and I want to make a clear message button to clear the screen of messages but not clear the databas

One option is to select the content in the DOM and reset those elements.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Hi I made a chat app and I want to make a clear message button to clear the screen of messages but not clear the databas

DOM stands for Document Object Model. To simplify, that's where the browser keeps the HTML page. You can traverse the browser DOM and make changes to any elements, including clearing the values.

http://en.wikipedia.org/wiki/Document...

I'd recommend to read how jQuery works and how to work with selects.

Return to “Issues”