I am a newbie to javascript. I am experimenting with the below code for retrieving cross site data.
How can I do this code work, e.g. I want each family member is alerted to the screen.
Thank you for your help.
The code is amended like this and the alert says [object Object], do you know what this means??:
<html>
<head>
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
// LOOP THROUGH EACH FAMILY MEMBER AND DO STUFF!
alert(mValue)
});
}
});
</script>
</head>
<body>
</body>
</html>
you don’t want to wrap the
oDatawith jQuery in your $.eachso, instead of
you want:
Also – you have to go down a level with the returned json (there is a first ‘ops:world-patent-data’ level), which will look something more like:
Another completely different way to do this is by using jquery deferreds syntax and using .pipe to transform the data – might be a bit cleaner than the
if