I've noticed in your AJAX response (view via Firebug), you have a
whole load of other stuff at the bottom of the response.
If you're inserting into a table, your response should begin with
<tr>, and end with </tr>.
But you have a whole load of other things like <script> tags. This
would make invalid HTML and would not display as expected.

On Mar 24, 3:44 pm, James <james.gp....@gmail.com> wrote:
> Try changing:
> <table id="searchresults"></table>
> to:
> <table><tbody id="searchresults"></tbody></table>
>
> and use:
> jQuery("#searchresults").append(r);
>
> See what happens.
>
> On Mar 24, 3:33 pm, Mathew <msin...@gmail.com> wrote:
>
> > yes whetehr slideup/down is there is the same issue. the page is up at
> > ->  http://undergroundinnertainment.com/2009/index.php?option=com_usersea...
> > thank you for your time also.
> > the response i get for example of a search is:
>
> > <tr class="sectiontableentry2" valign="top"><td><img src="/2009/images/
> > comprofiler/tn89_4786e03622513
> > .jpg" alt="edrease thomas" title="edrease thomas"></td><td>pracyce<br 
> > /><span class="small" style="color
>
> > :gray">paulsboro, nj | Is located: 7.78 From: 19146 | Artist</span></
> > td></tr><tr class="sectiontableentry1"
> >  valign="top"><td><img src="/2009/images/comprofiler/
> > tn192_488e66a03133a.jpg" alt="Sasha Rodriguez" title
> > ="Sasha Rodriguez"></td><td>Sasha Rosa<br /><span class="small"
> > style="color:gray">Philadelphia, PA
> > | Is located: 13.17 From: 19146 | Model</span></td></tr><tr
> > class="sectiontableentry2" valign="top">
> > <td><img src="/2009/images/comprofiler/tn284_48a77a7da5218.jpg"
> > alt="Tanikka" title="Tanikka"></td><td>Neek Neek2010<br /><span 
> > class="small" style="color:gray">Philadelphia, Pa | Is located: 3.12 From:
>
> >  19146 | Model</span></td></tr><tr class="sectiontableentry1"
> > valign="top"><td><img src="/2009/images
> > /comprofiler/tn292_48a979cc28c5b.jpg" alt="xiao xuan ANNIE liu"
> > title="xiao xuan ANNIE liu"></td><td>rosepetalgurl<br /><span class="small" 
> > style="color:gray">philadelphia, pa | Is located: 1.58 From:
>
> >  19146 | Model|*|Promoter</span></td></tr><tr
> > class="sectiontableentry2" valign="top"><td><img src="
> > /2009/images/comprofiler/tn318_48b5e93d18f83.jpg" alt="Shatorra Ming"
> > title="Shatorra Ming"></td><td>seximing<br /><span class="small" 
> > style="color:gray">Brooklyn, NY | Is located: 84.62 From: 19146 |
>
> >  Model</span></td></tr><tr class="sectiontableentry1"
> > valign="top"><td><img src="/2009/images/comprofiler
> > /tn619_496d72400be8d.jpg" alt="Tara" title="Tara"></
> > td><td>Mixbella<br /><span class="small" style="color
> > :gray">Bronx, NY | Is located: 96.33 From: 19146 | Model</span></td></
> > tr>
> > </td></tr></tbody></table></div>
>
> > <script type="text/javascript">
>
> >                                                                 
> > jQuery("#submit").click(function() {
>
> > var inputs = [];
>
> >         var name = jQuery("#search").attr('value');
>
> >                 var searchdistance = jQuery("#searchdistance").attr
> > ('value');
>
> >         var searchlocation = jQuery("#searchlocation").attr('value');
>
> >                                 var artist = jQuery
> > ("#cb_registerasA").attr('value');
>
> >                 var dj = jQuery("#cb_registerasD").attr('value');
>
> >                 var engineer = jQuery("#cb_registerasEn").attr
> > ('value');
>
> >                 var executive = jQuery("#cb_registerasEx").attr
> > ('value');
>
> >                 var model = jQuery("#cb_registerasM").attr('value');
>
> >                 var producer = jQuery("#cb_registerasProd").attr
> > ('value');
>
> >                 var promoter = jQuery("#cb_registerasProm").attr
> > ('value');
>
> >                 var photo = jQuery("#cb_registerasPhot").attr
> > ('value');
>
> >                                 if(jQuery("#search").attr('value') !=
> > "") {  inputs.push('search' + '
> > =' + name); }
>
> >                          if(jQuery("#searchlocation").attr('value') !=
> > "")       {   inputs.push('searchdistance'
> >  + '=' + searchdistance); }
>
> >                             if(jQuery("#searchlocation").attr
> > ('value') != "")  {     inputs.push('searchlocation'
> >  + '=' + searchlocation); }
> >   if(  jQuery('#cb_registerasA').attr('checked')) {  inputs.push
> > ('cb_registerasA' + '=' + artist); }
> >    if(  jQuery('#cb_registerasD').attr('checked')) { inputs.push
> > ('cb_registerasD' + '=' + dj); }
>
> >   if(  jQuery('#cb_registerasEn').attr('checked')) { inputs.push
> > ('cb_registerasEn' + '=' + engineer)
> > ; }
>
> >   if(  jQuery('#cb_registerasEx').attr('checked')) {  inputs.push
> > ('cb_registerasEx' + '=' + executive
> > ); }
>
> >    if(  jQuery('#cb_registerasM').attr('checked')) {  inputs.push
> > ('cb_registerasM' + '=' + model); }
>
> >  if(  jQuery('#cb_registerasProd').attr('checked')) {  inputs.push
> > ('cb_registerasProd' + '=' + producer
> > ); }
>
> >    if(  jQuery('#cb_registerasProm').attr('checked')) {   inputs.push
> > ('cb_registerasProm' + '=' + promoter
> > ); }
>
> >   if(  jQuery('#cb_registerasPhot').attr('checked')) { inputs.push
> > ('cb_registerasPhot' + '=' + photo
> > ); }
>
> >           // now if I join our inputs using '&' we'll have a query
> > string
>
> >           jQuery.ajax({
>
> >             data: inputs.join('&'),
>
> >             url: 'index.php?
> > option=com_usersearch&act=searchusers&format=raw',
>
> >             timeout: 8000,
>
> >             error: function() {
>
> >               console.log("Failed to submit");
>
> >             },
>
> >             success: function(r) {
>
> >               //alert(r);
>
> > jQuery("#searchresults").slideUp(function() {
> >      jQuery("#searchresults").html(r).slideDown();
>
> > });
>
> >             }
>
> >           })
>
> >           return false;
>
> >        });
>
> > </script>
>
>

Reply via email to