6 messages in com.googlegroups.google-picasa-data-apiRe: How can I read gphoto.height elem...| Subject: | Re: How can I read gphoto.height element associated values?![]() |
|---|---|
| From: | DOH (phil...@gmail.com) |
| Date: | 04/09/2007 03:36:01 PM |
| List: | com.googlegroups.google-picasa-data-api |
Many thanks, I could have sworn I had already tried that variant, maybe I missed out the period before the "$t". It works fine, now able to access the gphoto data as well as the exif. Brilliant!
But please could you explain what the $ is doing in the Javascript. Is it calling a php script on the server or what? I've tried looking through Javascript tutorials and can't find it used anywhere.
On Apr 9, 6:47 pm, Sven <s....@google.com> wrote:
Try:
var height = item.gphoto$height.$t; var width = item.gphoto$width.$t;
On 08/04/07, DOH <phil...@gmail.com> wrote:
Sorry that should also have read var height = item.gphoto$height; var width = item.gphoto$width; doesn't work either.
On Apr 8, 10:04 pm, "DOH" <phil...@gmail.com> wrote:
I am using the following code snippet (simmilar to that
describedhttp://www.zmarties.com/picasa/blog/2007/02/picasa-web-albums-feeds-i...),
but using the api feed rather than base feed to access information about pictures in an album at picasaweb.
<script language="JavaScript"> function output(data) { //for (var i = 0; i < data.feed.entry.length; i++) for (var i = 0; i <24; i++) { var item = data.feed.entry[i]; var src = item.content.src;//useful for downloading full image var title = item.title.$t;
var height = item.gphoto.height; var width = item.gphoto.width;
var filename = item.media$group.media$title.$t;//filename of image var imageurl0 = item.media$group.media$thumbnail [0].url;//small thumbnail }}
</script>
<script src="http://picasaweb.google.com/data/feed/api/user/my username/album/my albumname?kind=photo&alt=json-in- script&callback=output&access=public"></script>
However var height = item.gphoto.height; var width = item.gphoto.width; do not return any values as expected. Everything else works fine, just can's access gphoto data and exif data.
Can anyone help and also perhaps explain the significance of the $ in the javascript code? I am using the code without fully understanding it!
Many thanks in anticipation.




