Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2009
    Posts
    3
    Rep Power
    0

    Default Javascript problem

    Hi,

    I'm italian developer. I have a problem. I develope my simple web application using json-lib 2.3 and jquery for ajax call.

    My Servlet return json string generated with json-lib... for example:
    {"descrizione":"Questa la descrizione del computer","disponibile":false,"id":1,"nome":"Compu ter","prezzo":123.456}

    My jsp page contains a simple nutton that call follow js function:

    $.ajax({
    url: "json?method=prodotti",
    global: false,
    type: "POST",
    dataType: "json",
    success: function(msg){
    alert(msg);
    }
    });

    Application run correcty...

    Only problem is mozilla/firefox browser... In js console appears this message:

    Errore: non well-formed
    File sorgente: ...
    Riga: 1, Colonna: 1
    Codice sorgente:
    {"descrizione":"Questa � la descrizione del computer","disponibile":false,"id":1,"nome":"Compu ter","prezzo":123.456}

    Why? How can I solve it?

    Sorry for my english. I hope solve my problem

    Thanks

    Luca

  2. #2
    mrmatt1111's Avatar
    mrmatt1111 is offline Senior Member
    Join Date
    Aug 2009
    Location
    San Jose, CA, USA
    Posts
    320
    Rep Power
    5

    Default

    java is not javascript
    My Hobby Project: LegacyClone

  3. #3
    Join Date
    Nov 2009
    Posts
    3
    Rep Power
    0

    Default Yes

    Yes, I Know it... I generate json string using java lib... I asked for help because maybe someone has had the same problem

Similar Threads

  1. New Line problem in javascript
    By shuvra_pan in forum Advanced Java
    Replies: 3
    Last Post: 03-18-2009, 03:54 PM
  2. [SOLVED] import netscape.javascript.* problem
    By shwein in forum New To Java
    Replies: 2
    Last Post: 10-30-2008, 06:43 PM
  3. Java applet and Javascript type problem
    By Interdit in forum Java Applets
    Replies: 0
    Last Post: 05-27-2008, 01:38 PM
  4. javascript sliderbar problem with JSP page
    By prakash.eng in forum JavaServer Faces (JSF)
    Replies: 0
    Last Post: 12-17-2007, 08:15 AM
  5. Jsp and javascript
    By Ed in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 07-04-2007, 04:54 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •