Error Message in AJAX

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • techbytes
    New Member
    • May 2010
    • 36

    Error Message in AJAX

    I have a form in jsp that inserts data into the table,after inserting successful message and error message should be shown in the design page thr ajax.

    I have the error messge value in my jsp page. I do not know how to show this in ajax.
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    ?? the XMLHttpRequest just gets the response from your serverside script ... so you would just need to add the error message to the response and handle that in the request's callback ... without seeing any code that is involved ... it would be just guesswork to give a more precise answer ...

    Comment

    • techbytes
      New Member
      • May 2010
      • 36

      #3
      return value in ajax

      Iam inserting data into the table thr ajax in java.

      After inserting the value ,if there is any error in inserting the return value should be displayed from that java program thr ajax.


      how to display error message from java program in ajax.

      Comment

      • gits
        Recognized Expert Moderator Expert
        • May 2007
        • 5390

        #4
        as i said ... when you make an ajax-call the XMLHttpRequestO bject waits for a response ... the response could be any text that you want to have transported to the client ... just handle the text in the requests callback function ... there is nothing special. what do you currently do with the response? or don't you handle it at all?

        Comment

        Working...