Add an error part and see what's going on... (just rigth after succss,
comma separated)

            error: function(object,text,error){
                alert(object.status);
            }


On Feb 5, 2:37 pm, "georgelaugha...@gmail.com"
<georgelaugha...@gmail.com> wrote:
> I have a web application that i have been working on for a few months
> now and i ran into a stumbling block about 2 weeks ago, i have tried
> everything i can think of and with no success i figured i would get a
> second opinion.
>
> $(document).ready(function(){
>         $("button#Submit").click(function() {
>                 var     TN     = $("#TroopNumberS").attr("value");
>                 var     TL     = $("#TroopLocationS").attr("value");
>                 var     FN     = $("#FName").attr("value");
>                 var LN     = $("#LName").attr("value");
>                 var     A      = $("#Age").attr("value");
>                 var     R      = $("#Rank").attr("value");
>                 var     W          = $("#WeekS").attr("value");
>                 var id     = $("#ID").attr("value");
>
>                 $.ajax({
>                         type: "POST",
>                         url: "/php/addscout.php",
>                         data: 
> "TN="+TN+"&TL="+TL+"&FN="+FN+"&LN="+LN+"&A="+A+"&R="+R
> +"&W="+W,
>                         success: function(del){
>                                 $.facebox.loading(true);
>                                 $.get(["forms/addscout.php?id="+id], 
> function(data){
>                                         jQuery.facebox(data)
>                                 });
>                                 
> $.get(["records/addscoutprogress.php?tn="+TN+"&tl="+TL], function
> (data){
>                                         
> document.getElementById("progressivelist").innerHTML=data;
>                                 });
>                         }
>                 });
>         return false;
>         });
>
> });
>
> this is the post function the problem i am having is inside the
> success function
> it calls two pages the first is actually calling back it's self this
> clears out all the fields and lets them add again without the reload
> the second gets added to the bottom of the first and is a progressive
> list of what they added so they can see it happening as it happens.
> the content of the next page is as follows
>
> <table cellpadding="8">
> <?php
>
> mysql_connect("$host", "$username", "$password")or die("cannot
> connect");
> mysql_select_db("$db_name")or die("cannot select DB");
>
> $TroopNum=$_GET["tn"];
> echo "<br />";
> $TroopLoc="'".$_GET["tl"]."'";
>
> echo $TroopLoc;
> echo $TroopNum;
>
> $sql2="SELECT * FROM Scouts WHERE TroopNumber = $TroopNum AND Location
> = $TroopLoc";
> $result2=mysql_query($sql2);
> $count2=mysql_num_rows($result2);
> $x=0;
> for ($i=0; $i < $count2; $i++) {
> $x++;
> $row = mysql_fetch_array($result2);
> if($x==1){echo "<tr><td style='border-right:2px solid #DDD'>".$row
> ["ScoutName"]."</td>";}
> elseif($x==2){echo "<td style='border-right:2px solid #DDD'>".$row
> ["ScoutName"]."</td>";}
> else{echo "<td>".$row["ScoutName"]."</td></tr>";$x=0;}}
>
> ?>
> </table>
>
> just a simple table to show progress
> all of this works fine in Firefox safari everything but IE and the
> only part not working in IE is the second page it calls it back in but
> without the stuff they added ergo defeating it's purpose and i have
> checked it is submitting but the thing that i find most weird is that
> it won't even show the new content on a page reload, i have to close
> the page and open it again to get the new content it is like IE is
> loading that page as soon as the site loads and then just keeping the
> information it has instead of reloading it
>
> sorry for the long post but i wanted to make the problem and thanks
> for reading it please post any thoughts i will try anything my client
> won't accept the project without this function and it has me stumped
>
> thanks
> DJ

Reply via email to