Share on Google+Share on Google+

Colin Lansdown
Checking elsewhere with correctly blocked code and question
0 Answer(s)      5 years and 8 months ago
Posted in : JavaScript Questions

Hi I have already posted this question but realised I had made a few mistakes. So firstly the problem again!.

I have a textarea box for user comments which will return what ever they have typed to the same page used to enter it on. However it has no code to check for existing comments and overwrites the original comment. Here is the code:

<html>
<head>
<script type="text/javascript">
function showComment(){ var data=document.getElementById("text").value;
     alert(data);
     document.getElementById("comment").style.visibility= "visible";
     document.getElementById("lab").innerHTML=data;
     }

</script>
</head>
<body>Post Comment: <br><textarea id="text" rows="10" cols="40"></textarea><br>
<label id="comment" style="visibility:hidden"><b>Comments: </b>
</label>
<label id="lab">Comments</label><br>
<input type="button" value="Post" onclick="showComment();">
</body>
</html>

Please could you channge the code so it will create a new line with the new text every time the user clicks on comments.

Kind regards.

Colin.

Ads

View Answers









Related Tutorials/Questions & Answers:
Checking elsewhere with correctly blocked code and question
Checking elsewhere with correctly blocked code and question  Hi I have already posted this question but realised I had made a few mistakes. So... no code to check for existing comments and overwrites the original comment. Here
Checkbox blocked - WebSevices
in my database. After i refreshing the page that checkbox seats are blocked... in detail and send me code in detail. Read for more information. http
Advertisements
Comparing arrays not working correctly?
Comparing arrays not working correctly?  Comparing arrays not working correctly
UITextfield checking
UITextfield checking  hello,, how can i check UITextfield length or any specific value..   hii, here is some code for textfield checking if ([name.text isEqualToString:@"hello"]) or if (name.text.length<1
source code for the following question
source code for the following question  source code for the fuzzy c-means
Dirty Checking In Hibernate Example
Dirty Checking In Hibernate Example  What is the example of Dirty Checking in Hibernate? Give me some of the example code? Thanks
checking the data
checking the data  Sir, I have built an application where a user types a long string as input. Then after he/she types a single word of that string. I'm supposed to show all strings which have that word in them. Ex. the string
FORM Tag Correctly for Uploading Files.
FORM Tag Correctly for Uploading Files.  How To Write the FORM Tag Correctly for Uploading Files?   Hi friends, When you clicks the submit... process to work. The following PHP code, called logo_upload.php, shows you
program code for this question - Java Beginners
program code for this question  QUESTION 2: Address Information Lookup Every machine on a network has a unique identifier, called an IP address, which is used for communication purposes. An IP version 4 address is made up of four
xor operator not working correctly with array
xor operator not working correctly with array  main { int a[2...] ^= a[0]; //a[0] ^= a[1]; //this is working correctly. a[0] ^= a[1] ^= a[0] ^= a[1]; //this didn't work correctly why? printf("after swapping: %d %d\n
xor operator not working correctly with array
xor operator not working correctly with array  main { int a[2...] ^= a[0]; //a[0] ^= a[1]; //this is working correctly. a[0] ^= a[1] ^= a[0] ^= a[1]; //this didn't work correctly why? printf("after swapping: %d %d\n
program code for this question - Java Beginners
program code for this question  QUESTION 1: Electricity Bill Tshubang Energy Pty (Ltd) is a company that supplies electricity to its customers. This company has customers in Gaborone and Francistown only. The company maintains
Dirty Checking In Hibernate Example
Dirty Checking In Hibernate Example  What is the example of Dirty Checking in Hibernate? Give me some of the example code? Thanks   The Dirty Checking In Hibernate is used to track the status of the entity and detect
xor operator not working correctly with array
xor operator not working correctly with array  main { int a[2...] ^= a[0]; //a[0] ^= a[1]; //this is working correctly. a[0] ^= a[1] ^= a[0] ^= a[1]; //this didn't work correctly why? printf("after swapping: %d %d\n
Plz give me code for this question
Plz give me code for this question  Program to find depth of the file in a directory and list all files those are having more number of parent directories
Just checking elswhere
Just checking elswhere  I have been posting some questions within... question I was looking for is: I have a textarea box which post a single users... is the current code which does the job but it only allows a single comment on the page
Data is not inserting correctly in mysql database.
Data is not inserting correctly in mysql database.  Hello Sir, below is my code to insert data into database by list iteration... for each data cloumn ..at the time of end of the query... PLz see my code and point my
How To Write the FORM Tag Correctly for Uploading Files?
How To Write the FORM Tag Correctly for Uploading Files?  How To Write the FORM Tag Correctly for Uploading Files
php dynamic array checking
php dynamic array checking  php dynamic array checking
php dynamic array checking
php dynamic array checking  php dynamic array checking
Dirty Checking In Hibernate Example
Dirty Checking In Hibernate Example  Hi, What is Dirty Checking... Checking In Hibernate is an mechanism for automatically detects the changes in the state of an Entity. Check tutorial at Dirty Checking In Hibernate section
Dirty checking feature of hibernate.
Dirty checking feature of hibernate.  What is the dirty checking feature of Hibernate?   Hi friends, Dirty checking is a feature of hibernate. It allows the user or developer to avoid the time consuming databases
checking index in prepared statement
checking index in prepared statement  If we write as follows: String query = "insert into st_details values(?,?,?)"; PreparedStatement ps = con.prepareStatement(query); then after query has been prepared, can we check the index
Hibernate Dirty Checking
This section contains the concept of Hibernate dirty checking
Error in checking null value in string
Error in checking null value in string  Error in checking null value in string Hi am getting Exception : java.lang.NullPointerException in the following code: String registerno=null; registerno=request.getParameter("registerno
question
question  Hi how to send an error message to an html page after checking the database for different users.for eg:your user name or password is incorrect.reply me with code, without using bean
Text box Checking
Text box Checking  I want to Write only the word A-Z in a text box What is the code
pl z provide code for below question in javascripr or jsp - JSP-Servlet
pl z provide code for below question in javascripr or jsp  Once the parallel request happened, the user will not be able to continue his work, until... Friend, Please clarify your question. Thanks
stock checking in java with backend as access
stock checking in java with backend as access  Hi, I am doing a project in java,Can i able to know how to check the stock availability... get a source code for this program
please any one can help me to write a code for this question?
please any one can help me to write a code for this question?  1) Copy one file content to other? 2) Count the number of words in a file
What is the dirty checking feature of Hibernate?
What is the dirty checking feature of Hibernate?  What is the dirty checking feature of Hibernate?   Hibernate allows dirty checking... process of updating the changed object is called automatic dirty checking. Dirty
Tutorials   
Java Spring Hibernate Struts Training code for programming How can I dynamically load user-entered data as content of jquery dialog? java webcam integration question java coding Fix Scrollbar position in a checkboxList after postback Information Save Alert Country wise redirection to files Interface in javascript connect database with javascript Zip Code ZipCode how to validate the email login How to play FLV video files on Ipad using HTML code or javascript code? Nitobi Grid is not working in IE10/IE11 jquery issue plese help RegEx Tree structure from json whose parents can be dragged and dropped from child newyorklife insurance getElementById not working javascript code for search in html file Implement The Skeleton Code Implement This Skeleton Code Mobile Automation using Appium Computer forensic application Java: Searching a string from doc files java linked list urgent !!! java linked list urgent!!! library management library management library management library management question Html form using JavaScript to display the table content java how to prevent no from unroundin off on clicking text box again in JSP and Jquery graph generation from xml design file display data from database in textbox when id entered in textbox Javascript Code for all fields how to get HTTP GET request value using javascript array Javascript Querry autocomplete(): Spring mvc with jquery: I am not getting correct value in the text filed. Please help me Create SpreadSheet same as excel using java applet Create SpreadSheet same as excel using java applet How to change focus among multiple select boxes? Write JQUERY Code Write JQUERY Code Converting jsp variable to java variable java

Ads

 
Advertisement null

Ads