DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: HTML pulled through AJAX cause the request to fail without error?

  1. #1
    Join Date
    Oct 2006
    Posts
    2

    Lightbulb HTML pulled through AJAX cause the request to fail without error?

    Using three different 'found it on some random site' AJAX scripts for dynamically loading data from external PHP/HTML scripts, I am running into the same issue, which is telling me there is a problem with my content.

    Are there specific HTMl elements/quirks that would cause AJAX to either not pull or not display content based off some HTML quirks?

    Am I smoking crack or missing a bigger picture here?

    The following is the ajax response (as grabbed by firebug):
    Code:
    <table width="950" cellpadding="0" cellspacing="0" border="0" class="maintable">
    <form name="financeform" method="get">
    <tr class="moduleheader">
    <td colspan="3">Financial Data</td>
    <td colspan="7" align="right">
    For Period: 
    <select name="period" id="period" class="select" onChange="this.disabled=true;loadModule('financeoffice_rebuild','Financial Data','perfin=' + this.value);" ><option value="2008-06-26" SELECTED>June 2008</option><option value="2008-05-31">May 2008</option><option value="2008-04-30">April 2008</option><option value="2008-03-31">March 2008</option><option value="2008-02-29">February 2008</option><option value="2008-01-31">January 2008</option></select>
    Type: 
    <select name="type" id="type" class="select" onChange="this.disabled=true;document.financeform.period.disabled = true;loadModule('financeoffice_rebuild','Financial Data','orgcodeconvfin=' + this.value);" ><option value="LOC" SELECTED>Location</option><option value="SER">Service Line</option></select>
    		</td>
    	</tr>
    </form>
    	<tr class="rowheader">
    		<td valign="bottom">&nbsp;</td>
    		<td valign="bottom" align="right" width="95">Corporate</td>
    		<td valign="bottom" align="right" width="95">VH</td>
    		<td valign="bottom" align="right" width="95">LO</td>
    		<td valign="bottom" align="right" width="95">DEN</td>
    		<td valign="bottom" align="right" width="95">SC</td>
    		<td valign="bottom" align="right" width="95">AT</td>
    		<td valign="bottom" align="right" width="95">RE</td>
    		<td valign="bottom" align="right" width="95">IN</td>
    		<td valign="bottom" align="right" width="100">Total</td>
    	</tr>
    	<tr class="rowalt">
    		<td colspan="10"><b>Month To Date</b></td>
    	<tr class="row">
    		<td width="150px" style="padding-left: 20px;"><b>Collections</b></td>
    		<td align="right">-</td>
    		<td align="right">-</td>
    		<td align="right">-</td>
    		<td align="right">-</td>
    		<td align="right">-</td>
    		<td align="right">-</td>
    		<td align="right">-</td>
    		<td align="right">-</td>
    		<td align="right"><b>-</b></td>
    	</tr>
    	<tr class="rowaltalt">
    		<td width="150px" style="padding-left: 20px;"><b>Billings</b></td>
    		<td align="right">-</td>
    		<td align="right">-</td>
    		<td align="right">-</td>
    		<td align="right">-</td>
    		<td align="right">-</td>
    		<td align="right">-</td>
    		<td align="right">-</td>
    		<td align="right">-</td>
    		<td align="right"><b>-</b></td>
    	</tr>
    	<tr class="rowBottomBorder">		<td colspan="11">&nbsp;</td>
    	</tr>
    	<tr class="row">
    		<td width="150px" style="padding-left: 20px;"><b>Revenue</b></td>
    		<td align="right">-</td>
    		<td align="right">-</td>
    		<td align="right">-</td>
    		<td align="right">-</td>
    		<td align="right">-</td>
    		<td align="right">-</td>
    		<td align="right">-</td>
    		<td align="right">-</td>
    		<td align="right"><b>-</b></td>
    	</tr>
    	<tr class="rowaltalt">
    		<td width="150px" style="padding-left: 20px;"><b>Effort</b></td>
    		<td align="right">-</td>
    		<td align="right">-</td>
    		<td align="right">-</td>
    		<td align="right">-</td>
    		<td align="right">-</td>
    		<td align="right">-</td>
    		<td align="right">-</td>
    		<td align="right">-</td>
    		<td align="right"><b>-</b></td>
    	</tr>
    	<tr class="rowBottomBorder">		<td colspan="11">&nbsp;</td>
    	</tr>
    	<tr class="row">
    		<td class="rowtotal" colspan="10"><span class="sortlinkhover" onClick="loadModule('financeoffice_rebuild','Refreshing Module','');">
    <img src="/devpat/dashboard/images/refresh.gif" border="0" /> </span>
    <a href="standalone.php?module=financeoffice_rebuild" class="newwin" target="_blank" title="Open in New Window"> <img src="/devpat/dashboard/images/new-win.gif" border="0" /></a></td>
    	</tr>
    </table>
    Any insight would be greatly appreciated.

    Thanks,
    -=Lazz=-

  2. #2
    Join Date
    Mar 2007
    Location
    Bangalore, India
    Posts
    247
    What code are you using to put the response into the page? xxx.innerHTML? I've heard that AJAX doesn't work when the XML is not well formed. Never verified it though... Always have used valid XML... Try using some simple validator. First, you could try putting the text nodes ("For Period:" and "Type") into some container like <DIV> or <P>... It might work.

  3. #3
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,663
    Here is an article that you might find interesting on this subject.

    http://www.devarticles.com/c/a/XML/X...nses-and-AJAX/

Similar Threads

  1. Replies: 1
    Last Post: 07-16-2007, 10:42 AM
  2. Replies: 5
    Last Post: 01-17-2007, 02:37 PM
  3. Link error
    By Shar in forum C++
    Replies: 5
    Last Post: 12-19-2006, 07:07 AM
  4. I can't link FreeImage to C#
    By mesh2005 in forum .NET
    Replies: 1
    Last Post: 03-06-2006, 09:16 AM
  5. Xindice query
    By nonolap in forum XML
    Replies: 0
    Last Post: 05-26-2005, 04:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center