We help IT Professionals succeed at work.
Get Started

text to appear on the top of list rather then bottom

Member_2_5230414
on
245 Views
Last Modified: 2012-08-14
At the moment my newest post appears at the bottom

with the below code how can i add it to the top so:

1
2
3
4
5

rather then now what it shows is

5
4
3
2
1

<script type="text/javascript" >
    $(function () {
        $(".submit").live("click", function () {

            var comment = $("#textbox").val();
            var dataString = '&comment=' + comment;
            if (comment == '') {
                alert('Please Give Valid Details');
            }
            else {
                $("#flash").show();
                $("#flash").fadeIn(400).html('<img src="ajax-loader.gif" />Loading Comment...');
                var post = document.getElementById("textbox").value;
                $.ajax({
                    type: "POST",
                    url: "Default2.aspx?post=" + post, 
                    data: dataString,
                    cache: false,
                    success: function (html) {
                        $("div#update").append(html);
                        $("div#update li:last").fadeIn("slow");
                        $("#flash").hide();
                    }
                });
            } return false;
        });
    });


    </script>

<div id="nscontainer">
						<div id="nscontent">
							<asp:label id="thetext" runat="server" text="Label"></asp:label>
						</div>
					</div>
					<script type="text/javascript">
					    if (iens6) {
					        document.write('</div></div>')
					    }
					    function button_onclick() {

					    }

                    </script>
					<div style="float:left; height: 216px;">
						<a href="#" onmouseover="moveup()" onmouseout="clearTimeout(moveupvar)"><img alt="up" src="../images/uparrow.png" border="0"/></a><br/>
						<div style="margin-top:165px">
							<a href="#" onmouseover="movedown()" onmouseout="clearTimeout(movedownvar)"><img alt="down" src="../images/downarrow.png" border="0"/></a>
						</div>
					</div>
				</div>
				<div id="rightblog">
					<div id="pblabel">
						<asp:imagebutton id="PBbutton" imageurl="~/images/pbbtn.png" runat="server"/>
					</div>
					<div id="bloglabel">
						<asp:imagebutton id="Blogbutton" imageurl="~/images/blogbtn.png" runat="server"/>
					</div>
					<div id="traininglabel">
						<asp:imagebutton id="Tlogbutton" imageurl="~/images/trainingbtn.png" runat="server"/>
					</div>
				</div>
			</div>
           
			<div id="profilenewsfeed"><div id="shoutinput" >
               
               
                       <asp:TextBox name="textbox" id="textbox" TextMode="MultiLine" runat="server"></asp:TextBox>
								<div id="button-box">
                                    <asp:Button Text="Submit" CssClass="submit" type="submit" id="Submit" value="Submit" runat="server" />
                                    <asp:Button Text="Close" class="button" type="submit" id="close" value="Cancel" runat="server" />
                                    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
           <div align="left" id="character-count">
<div id="count">140</div> 
</div>

 </div> 
								</div>
                          <div id="flash"></div>     
                                <div id="update" class="timeline">                               
                                  
</div>
 <li class="box">
 <div class="shoutbox">
 
       
                                <div class="shoutbox-image"> <asp:Image ID="Image4" runat="server" ImageUrl="~/images/50profiles.jpg" /></div>
                                <div class="shoutbox-other">fuehu rufhuie hreuhv euihreuh trueiurehur ehureht urehuthruthruihtuirhtuirhtuirhtur hurhuriehg iruhruiehgfruei rueghruehurrg grrgrgreg</div> 
                                <div class="shoutbox-reply">&nbsp;<asp:Button ID="Reply" runat="server" Text="Reply" Visible="true" /><asp:Button ID="closebox" runat="server" Text="Close" Visible="false" />
                                     </div>
                                    
                                         <asp:TextBox ID="Replytextbox" Visible="false" runat="server" Width="439px" 
                                    CssClass="Replytextbox"></asp:TextBox>
                              
                            </div>
</li>






			</div>

                        
          
           </div>

Open in new window

Comment
Watch Question
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE