4 Replies - 1119 Views - Last Post: 19 October 2013 - 01:27 PM

#1 ALI_JI  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 27-September 13

How To Create Clear Screen Button For My Chat Room?

Posted 18 October 2013 - 09:30 AM

Hi, friends how are you??
I have a simple chat room and now i want to know that how can i add clear screen button in my chat room which is use for clear chat of users. When we enter message and enter then chat is displayed on chat screen i and to clear chat screen now anyone can help me or tell me how i do it. Here is the chat screen in Div <div id="blab_chat"></div> in this code i want to add clear button and clear screen coding how i do it?

This post has been edited by laytonsdad: 19 October 2013 - 01:19 PM
Reason for edit:: remove bold and add inline


Is This A Good Question/Topic? 0
  • +

Replies To: How To Create Clear Screen Button For My Chat Room?

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 13959
  • View blog
  • Posts: 55,712
  • Joined: 12-June 08

Re: How To Create Clear Screen Button For My Chat Room?

Posted 18 October 2013 - 09:44 AM

Is this java or javascript?
Was This Post Helpful? 0
  • +
  • -

#3 ALI_JI  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 27-September 13

Re: How To Create Clear Screen Button For My Chat Room?

Posted 19 October 2013 - 12:30 AM

View Postmodi123_1, on 18 October 2013 - 09:44 AM, said:

Is this java or javascript?

javascript
Was This Post Helpful? 0
  • +
  • -

#4 Flukeshot  Icon User is offline

  • A little too OCD
  • member icon

Reputation: 417
  • View blog
  • Posts: 1,030
  • Joined: 14-November 12

Re: How To Create Clear Screen Button For My Chat Room?

Posted 19 October 2013 - 12:39 AM

Then we should move it to the Javascript forum where you're likely to get more help. :)
Was This Post Helpful? 0
  • +
  • -

#5 laytonsdad  Icon User is offline

  • Let it rip!
  • member icon

Reputation: 466
  • View blog
  • Posts: 1,992
  • Joined: 30-April 10

Re: How To Create Clear Screen Button For My Chat Room?

Posted 19 October 2013 - 01:27 PM

First off, Please don't type in all bold.
Second, using code tags or inline-code tags helps read your post.


Now to the question,

Quote

Here is the chat screen in Div <div id="blab_chat"></div> in this code i want to add clear button and clear screen coding how i do it?

Is this the entire code for the div?

Do you want to just delete everything in the div?

If so, you will need to create a function to run with the onclick event of the button.
Inside the function you will select the div by id and set the innerHTML value to "".

This post has been edited by laytonsdad: 19 October 2013 - 01:28 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1