Hope all is well... I'm having a problem with a while loop... from what I can see it all looks fine... I have a piece of javascript running within the PHP code that basically when its clicked is to show a textarea and it is to do this for each record in my table. I've put the code in below... any help would be great.

Just to be precise: the javascript doesn't run inside the php code, it's outputted like the rest of the html/css code and sent to the browser.

As far as your problem is concerned, doesn't that loop output anything? Then your query isn't returning any rows.

stu567blue
—
2012-04-19T11:35:26Z —
#3

The loop outputs the records in the database... however when your click on the comment link where the Javascript is located it outputs one comment box at the top of the page... when what I want is each comment link to have its own comment box... if that makes sense

guido2004
—
2012-04-19T14:01:02Z —
#4

Maybe But that's a javascript question. I've moved this thread to the JS forum.Could you please post the resulting html/js code created by this script?

stu567blue
—
2012-04-19T15:01:29Z —
#5

Just to be clear the While loop is written in PHP and the only Javascript that is within the code is in this line here:

What needs to happen is when I click comment is for it to show a text area for each of the records in my database: Example if I see a status and I want to comment on this, I click comment and a textarea appears under that status.. once I've left comment I then see another status further down the page I press comment and what needs to happen is the textarea to appear below that persons status, not to go to the top of the page.

stu567blue
—
2012-04-19T15:36:05Z —
#6

Hey

Quick update for you all.. I have solved the problem by using the deal_id in my table as a number to differentiate each of the different outputs...