javascript - Jquery asp.net error -


i cant figure why makes error. when run below codes. jquery function works but text revert before clicking.please help.

<%@ page title="" language="c#" masterpagefile="~/site1.master" autoeventwireup="true" codebehind="viewlistofprojects.aspx.cs" inherits="final_year_project_allocation_system.stud.viewlistofprojects" enablesessionstate="true" enableviewstate="false" %> <asp:content id="content1" contentplaceholderid="head" runat="server"> </asp:content> <asp:content id="content2" contentplaceholderid="sidebarcontent" runat="server">     <div class="well">         <ul class="nav nav-list">             <li class="nav-header">student menu</li>             <li><a href="registerteam.aspx">home</a></li>             <li><a href="student_project_choice.aspx">select project</a></li>             <li class="active"><a href="viewlistofprojects.aspx">view project proposal</a></li>             <li><a href="viewallocatedproject.aspx">view allocated project</a></li>             <li><a href="mscprojectproposalform.aspx">propose project</a></li>             <li><a href="changepassword.aspx">change password</a></li>         </ul>     </div> </asp:content> <asp:content id="content3" contentplaceholderid="bodycontent" runat="server">         <div class="navbar navbar-inverse navbar-fixed-top">         <div class="navbar-inner">             <div class="container-fluid">                 <a class="btn btn-navbar"></a><a class="brand" href="#">project allocation system</a>                 <div class="nav-collapse collapse">                     <p class="navbar-text pull-right">                         logged in                         <asp:label id="lblusername" runat="server"></asp:label>                         <asp:linkbutton id="btnlogout" runat="server" onclick="btnlogout_click">logout</asp:linkbutton>                     </p>                 </div>             </div>         </div>     </div>     <asp:label id="lblmessage" runat="server" text=""></asp:label>     <div class="pull-right">     <asp:label id="lblpdf" runat="server" text="view in pdf format" cssclass="label label-info"></asp:label>     <asp:imagebutton id="btnpdf"              imageurl="~/images/adobe-pdf-document-icon.png" height="60px" width="60px" runat="server" onclientclick="redirect();"/>     <br/><br/>     </div>  <div id="pdfcontent">     <p></p> </div>  <asp:placeholder id="projectholder" runat="server"></asp:placeholder>   <script language="javascript" type="text/javascript">     function redirect() {         $('p').text("ss"); } 

i want text contain "ss" jquery function , stays way.

try setting on client click btnpdf this:

onclientclick="redirect(); return false;" 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -