0

I am Uploading both data and files in one form using Ajax as given answer in the post Uploading both data and files in one form using Ajax?

I need to display the response in the alert as shown below

file uploaded successfully
Thanks for uploading

But i am getting response as file uploaded successfully<br/>Thanks for uploading So, can any one tell me how to get the response without any html tags..

Community
  • 1
  • 1
lalith458
  • 695
  • 2
  • 12
  • 30
  • 2
    Serve the response without the `
    `s?
    – Pekka Apr 30 '13 at 07:27
  • Please provide the exact extract of your code in which the answer is constructed. – cimnine Apr 30 '13 at 07:27
  • possible duplicate of http://stackoverflow.com/questions/10255766/strip-all-html-tags-with-jquery – Waygood Apr 30 '13 at 07:29
  • Why is your server script sending `
    ` if you don't want them? If it's sending HTML, you should use `.html()` to display it, not `.text()`.
    – Barmar Apr 30 '13 at 07:51
  • just curious, where does your message **file uploaded successfully
    Thanks for uploading** comes from? maybe you should trace where you've echoed it an modify it from there.
    – Þaw Apr 30 '13 at 08:20
  • the response is coming form another php file as response in the alert@Paw Cabelin – lalith458 Apr 30 '13 at 08:45

1 Answers1

2

$(data).text() for stripping <br/>

Deval Shah
  • 1,094
  • 8
  • 22