Hi,
How can I get the display of multiple page output from
events/search? For example in this sample code, the
events are available in 'data' and displayed using a
DIV element. I used this program and got
data.page_count as 8, but the div displays only the
first page. Any suggestions to modify this program to
get multiple pages?
EVDB.API.call("/calendars/events/list", oArgs,
function(data)
{
var text = '', date = '', elData =
document.getElementById("data");
if (data.events && data.events.event &&
data.events.event.length)
{
for (var i=0, l=data.events.event.length; i <
l; i++)
{
date = ...
text += '<p>'+date+'<br/>
<strong>'+data.events.event[i].title+'</strong>
• <a
Details</a>'+'</p>';
}
elData.innerHTML = text;
}
else
{
...
}
});
}
</script>
</head>
<body>
<div id="data"></div>
</body>
</html>
Hi Meena,
I'm a beginner too, but I'm lucky enough to work at
Eventful, so I
got a lot of help making an API driven calendar.
It displays the 15 most upcoming events from a smart
calendar that
shows all political events happening in Washington,
DC. You can see
the original calendar here:
C0-001-000068866-7/
The code I used was based on the example code. I've
attached it here,
so hopefully it can help point you in the right
direction. Let me
know if you have any specific questions and I'll be
happy to help out.
Cheers,
Jed.
---------------------------------
Test Calendar
window.onload = function() { var oArgs = {
app_key: "test_key", id:
"C0-001-000068866-7", page_size:15 };
EVDB.API.call("/calendars/events/list", oArgs,
function(data) { var text = '', date = '',
elData = document.getElementById("data"); if
(data.events & data.events.event &
data.events.event.length) { for (var i=0,
l=data.events.event.length; i '+date+'
'+data.events.event[i].title+' at
'+data.events.event[i].venue_name+' • Event
Details'+'
'; } elData.innerHTML = text; }
else { elData.innerHTML = "No upcoming
events found."; } }); }
Political Events in Washington. Powered by
From: MEENA SELVAM < >
Date: March 17, 2007 5:53:29 PM PDT
Subject: [api-developers] sample code for a basic
query
Hi,
I am a beginner, trying to use evdb api for a
school
project. I went through the example code given in
eventful API website to access evdb apis using
javascript. But it is not clear how to run the
code. I
tried uncommenting the first section of the code,
and
put it in a html file, but I dont see any results
in
the browser , not even the alert messages.
Can anyone explain how that sample example can be
utilized, or email me any other sample code, that
can
be used to do a basic EVDB query
Thanks in Advance,
Meena
______________________________________________________________________
______________
Now that's room service! Choose from over 150,000
hotels
in 45,000 destinations on Yahoo! Travel to find
your fit.
____________________________________________________________________________________
Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out.