Results 1 to 2 of 2

Thread: AJAX returning HTML as part of response text

  1. #1
    Join Date
    Sep 2010
    Posts
    38

    AJAX returning HTML as part of response text

    I recently noticed that my response text includes a blank page. The string that I get is:

    <html><body></body></html>response text attached here

    As a result my first array element has the "<html><body></body></html>" attached to it.

    Is there a way to easily get rid of the HTML tags?



    =================================================

    For those who would like to see the actual page/problem:

    response text:

    http://www.troutsalmonchar.com/Table...p?sp=TR&tp=wet (view page source)

    The page where this info is used:
    http://www.troutsalmonchar.com/Pages....php#FlyFinder

    After a choice is made in the first two drop down menus, the third menu is populated with the elements from the response text in the php file above. Since the HTML tags are attached to the first element in the drop down menu, my first options do not work properly.

    I have currently set up alerts to show up the response text on the page.

  2. #2
    Join Date
    Sep 2010
    Posts
    38
    OK, I found a solution. I used a function removing the HTML tags from a string.

    But why was I getting HTML tags in the response text?

Similar Threads

  1. Update part of a webpage every few seconds using AJAX?
    By edparry in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 1
    Last Post: 08 Feb 2011, 03:36 PM
  2. AJAX responseText not getting reading server response
    By cmccully in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 0
    Last Post: 22 Sep 2010, 09:21 PM
  3. IE is not centering the main part of a PHP page, have tried text-align: center
    By kitzi in forum Web Design, HTML Reference and CSS
    Replies: 0
    Last Post: 02 Jun 2009, 12:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •