Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Changing this JQuery

Posted on 2012-03-10
3
Medium Priority
?
175 Views
Last Modified: 2012-03-18
If you look at this link, there's a line of code:

error: function(XMLHttpRequest, textStatus, errorThrown) {
                    alert(textStatus);

Open in new window


Is there anyway NOT to display an alert..instead i want to display the msg in the page in the page...by binding it to lblmsg.Text. How can  I do this?

http://www.dotnetcurry.com/ShowArticle.aspx?ID=515
0
Comment
Question by:Camillia
3 Comments
 
LVL 15

Accepted Solution

by:
Navneet earned 1000 total points
ID: 37706691
Hi!

Add the HTML to the page

<form id="form1" runat="server">
<div class="demo">
<div id="lblmsg">
<div class="ui-widget">
    <label for="tbAuto">Enter Email: </label>
     <asp:TextBox ID="tbAuto" class="tb" runat="server">
     </asp:TextBox>
</div>
</div>
</form>

Open in new window


And

error: function(XMLHttpRequest, textStatus, errorThrown) {
                    $("#lblmsg").val(textStatus);
}

Open in new window


Is this want you are looking for?

Thanks!
0
 
LVL 75

Assisted Solution

by:Michel Plungjan
Michel Plungjan earned 1000 total points
ID: 37707500
.val?

Either use .text() or .html() for a div - it will wipe the form since you did not close it either
0
 
LVL 7

Author Comment

by:Camillia
ID: 37707970
let me try
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Integration Management Part 2
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question