- This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › Pulling text out of a P tag and putting it into a text area
Okay, just used Chris’ snippet on making a div clickable. Now, I would like to take the text in my p tag and place it in a text area on my page. For example, here is my jQuery:
});
Now, I want to take whatever is in a paragraph tag with the class of answer and place it into my text area. Is there a way to do this? I’m a jQuery noob, but I know I could do something like this using AJAX and .NET.
I think this should do it. The p tag at the beginning is the paragraph you want to target and inside the append is the opening and closing tags of your text area that you want to target. Tell me how it goes.
So, I tried that and nothing came of it. Here is the code I have now:
What happens when you click on this you get a 404 error. I tried it with out the second line, but then nothing happens on the site.