Hi Scott,
in alert i am getting the real JSON data...like the one below....
{
item:{
info:{
id:'"+productId+"',
name:'"+name+"',
company:'"+company+"',
cost:'"+cost+"',
desc:'"+desc+"'
}
}
but after eval and all i am not getting anything
var parsedJson = myJsonObject.evalJSON();
alert(parsedJson);
alert(parsedJson.item.info.id);
these 3 lines r not working . that is i cant extract data from it
On Apr 23, 7:53 pm, ScottW <[EMAIL PROTECTED]> wrote:
> Are you seeing real JSON data in that alert(parsedJson)?
>
> Here's what I did to debug this sort of thing (though I did have an
> XML step) - throw in a textarea field on your page, give it an id
> name, and dump the contents of a variable into it via $
> ('textarea_id_name').value = yourVar. I find that works better than an
> alert, as you can look at it later and scroll through it etc.
>
> Do that, and if the contents appear to be JSON structured info, cut/
> paste it here.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---