473,387 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

When press on a link on my page one text area opens and the others close

I have many text area in one page I get them by a link called "comment" so her is the idea I made a code in php that includes a form when the user clicks on "comment" this is an Ex.

Expand|Select|Wrap|Line Numbers
  1. if(isset($_GET['comments'])) { $comments = $_GET['comments']; } if (!isset($_GET['comments'])) { $comments = ""; } if ($comments == "ok") {
  2.  
  3.                           echo "<tr><td colspan='6' align='center'>";
  4.                           echo "<span class='rePost'>Re : &nbsp;</span><span
  5.  
  6.     class='blogerName'>$blog->ByName"; include "postComments.php"; echo "";
  7.  
  8.                          } ?>
now when the user clicks on comment it just includes the comment text area but here there is more then one threads on the same page or I can say more then one post on the same page so when the user clicks on "comment" on post one all the other posts get the text area below it. what I need here is when the user clicks comment on post "1" the text area appear below post "1" and not 2 or 3 or any other one on this page. I hope I got you to the point that I want.
Jun 26 '11 #1
1 1099
Yousef, send us a screenshot, and a larger block of your code.

Basically, on your 'comment' links you need to be specifying the id of the post you are commenting on.

Then, in your loop that displays each post, you need to check if the comment id matches the id of the post you are displaying. If so, show the comment form.
Jul 12 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: PeP | last post by:
Good morning, I have a form containing a text-area, I'd like to know if it exists a function that, when I activate an event, returns the position of the cursor in the text-area. For example, I...
2
by: Bhupesh Naik | last post by:
This is a query regarding my problem to make a spell and grammar check possible in text area of a web page. We have aspx pages which are used to construct letters. The browser based screens...
0
by: Vilmar Brazão de Oliveira | last post by:
Hi, I am having err when creating link to each line of grid at LINE 38. My objective in asp.net is: each line can be linked to page with your parameters as VB 5/6, Delphi 5/6/7, etc.... See the...
4
by: devine | last post by:
Hi All, I am VERY new to Javascript. I have been provided with some code, which will enable me to hide/show a text area and change a submit button dependant on a check box. <!DOCTYPE html...
1
by: Gap | last post by:
Hello all, I want to create a page with an image and when the cursor is moving over the image (e.g. over text on the image the text is highlighted or changes color or something similar. So that...
4
by: Vikas Kumar | last post by:
propertyDescription += "<br>" + lblpropertyDescription.Text; //here i am reading some text from text area i test wrting "p" in my text area it wrks fine but when i write <pin my text...
1
by: divya | last post by:
I have a form which has a textarea,name - txtTo where he adds email addresses.Now when he clicks on sendemail I want to open a mailto link with addresses taken from textarea. Example I added...
5
by: SSG | last post by:
I have text area having 4 rows & 10 cols.. while I am typing in Textarea , it should not accept the 5 th row & 11 th col... Hw to create text area like that....
1
by: amulyab | last post by:
Hi, M using browse button to select a text file.The contents of text is made to display inside text area.Now i have to add some links for the some parts of text which is inside text area.How can i...
3
by: Prajaktaj | last post by:
Hi All, I am using an instance of TextArea. When I press an enter key while entering the text in that text area I am not able to receive the whole text by using the method var str1:String =...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.