I would like to "hide" everything encompassed in a particular <p> tag that is 'named' by a variable(created a php script that reads from the db and echo's a users details in a <p> that has the name of the 'member number' via a variable - user. (yes it sounds a bit weird....not easy to explain)
echo "<p id=\"results\" name=\"".$info['username']."\">";
....
echo "</p>";
The above works just fine. The elements name is infact the 'username'. I have passed the variable back to html document as 'user' (yes, I verified that it is the correct value in the variable as it is passed to another php script via ajax and returns the appropriate result)
What I need to do is when I click a button, the contents within the specific <p></p> are set to display:none . The problem I am having is that the elements 'name' is only known by a variable - 'user'. ....I hate coding DOM related functions lol...