her er hele siden som den ser ud efter jeg prøvede at ændre event - jeg fik desværre stadig object error:
<html xmlns="
http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>Timeout Intellisync</title>
<LINK rel="stylesheet" type="text/css" href="../inc/style/timeout_style_print.css">
<script src="
http://www.google.com/jsapi?key=ABQIAAAA-4DPu8eLSXMGJBa1LCchkhQH9W39-xhJgRxDecUFR532IY3yLBRMWPH6xjGJncGUW0pt06u6fNf4bw" type="text/javascript"></script>
<script language="javascript">
google.load("gdata", "1");
</script>
</head>
<body>
<img src="anything.gif" style="position: absolute; top: -1000px;" />
<div id="information"></div><br />
<div id="events"></div><br />
<script type="text/javascript">
function logMeIn() {
scope = "
http://www.google.com/calendar/feeds/"; var token = google.accounts.user.login(scope);
}
function setupMyService() {
myService = new google.gdata.calendar.CalendarService('TimeoutCal');
logMeIn();
}
function logMeOut() {
document.getElementById("login").disabled = false;
document.getElementById("logout").disabled = true;
document.getElementById("synchronize").disabled = true;
google.accounts.user.logout();
}
</script>
<script>
// Create the calendar service object
var calendarService = new google.gdata.calendar.CalendarService('TimeoutCal');
// The default "private/full" feed is used to retrieve events from
// the primary private calendar with full projection
var feedUri = '
http://www.google.com/calendar/feeds/default/private/full'; var query = new google.gdata.calendar.CalendarEventQuery(feedUri);
query.setMaxResults(50);
query.setSingleEvents(true);
// The callback method that will be called when getEventsFeed() returns feed data
var callback = function(result) {
// Obtain the array of CalendarEventEntry
var entries = result.feed.entry;
var Unsynchronized = 0;
var Synchronized = 0;
for (var i = 0; i < entries.length; i++) {
var EntryEvent = entries[i];
if(EntryEvent.getExtendedProperties().length == 0){
Unsynchronized ++;
document.googlesync.titles.value += ('][#TO:DataCell:' + EntryEvent.getTitle().getText());
document.googlesync.details.value += ('][#TO:DataCell:' + EntryEvent.getContent().getText());
//fang locations array
document.googlesync.adresses.value += ('][#TO:DataCell:');
for(var l = 0; l < EntryEvent.getLocations().length; l++){
document.googlesync.adresses.value += ('][#TO:PartDataCell:' + EntryEvent.getLocations()[l].getValueString());}
//fang times
document.googlesync.times.value += ('][#TO:DataCell:');
for(var t = 0; t < EntryEvent.getTimes().length; t++){
document.googlesync.times.value += ('][#TO:PartDataString:' + google.gdata.DateTime.toIso8601(EntryEvent.getTimes()[t].getStartTime()));
document.googlesync.times.value += ('][#TO:PartDataString:' + google.gdata.DateTime.toIso8601(EntryEvent.getTimes()[t].getEndTime()));}
//fang participants
document.googlesync.participants.value += ('][#TO:DataCell:');
for(var p = 0; p < EntryEvent.getParticipants().length; p++){
document.googlesync.participants.value += ('][#TO:PartDataString:' + EntryEvent.getParticipants()[p].getValueString());
document.googlesync.participants.value += ('][#TO:PartDataString:' + EntryEvent.getParticipants()[p].getEmail());}}
else{
document.googlesync.sids.value += ('][#TO:DataCell:' + EntryEvent.getExtendedProperties()[0].getValue());
Synchronized ++;
document.googlesync.stitles.value += ('][#TO:DataCell:' + EntryEvent.getTitle().getText());
document.googlesync.sdetails.value += ('][#TO:DataCell:' + EntryEvent.getContent().getText());
//fang locations array
document.googlesync.sadresses.value += ('][#TO:DataCell:');
for(var l = 0; l < EntryEvent.getLocations().length; l++){
document.googlesync.sadresses.value += ('][#TO:PartDataCell:' + EntryEvent.getLocations()[l].getValueString());}
//fang times
document.googlesync.stimes.value += ('][#TO:DataCell:');
for(var t = 0; t < EntryEvent.getTimes().length; t++){
document.googlesync.stimes.value += ('][#TO:PartDataString:' + google.gdata.DateTime.toIso8601(EntryEvent.getTimes()[t].getStartTime()));
document.googlesync.stimes.value += ('][#TO:PartDataString:' + google.gdata.DateTime.toIso8601(EntryEvent.getTimes()[t].getEndTime()));}
//fang participants
document.googlesync.sparticipants.value += ('][#TO:DataCell:');
for(var p = 0; p < EntryEvent.getParticipants().length; p++){
document.googlesync.sparticipants.value += ('][#TO:PartDataString:' + EntryEvent.getParticipants()[p].getValueString());
document.googlesync.sparticipants.value += ('][#TO:PartDataString:' + EntryEvent.getParticipants()[p].getEmail());}
}
}
document.googlesync.posthidden.value = ('j');
document.googlesync.unsync.value = (Unsynchronized);
document.googlesync.existsync.value = (Synchronized);
document.googlesync.submit();
}
// Error handler to be invoked when getEventsFeed() produces an error
var handleError = function(error) {
document.getElementById("events").innerHTML += (error);
}
// Submit the request using the calendar service object
calendarService.getEventsFeed(query, callback, handleError);
</script>
<form name="googlesync" action="" method="post">
<input type="button" value="opret ny aftale" id="newevent" name="newevent" onclick="location='crmhistorik.asp?menu=crm&shownumofdays=5&func=opret&id=0&ketype=e&selpkt=kal&showinwin=j'" style="visibility:hidden"/><br />
<input type="button" id="synchronize" name="synchronize" value="luk vindue" onclick="submit()"/><br />
<input type="hidden" id="confirmposthidden" name="confirmposthidden" value=""
style="width:600px;" />
<input type="hidden" id="confirmposts" name="confirmposts" value=" "
style="width:600px;" />
<input type="hidden" id="posthidden" name="posthidden" value=" " style="width: 600px;" />
<input type="hidden" id="unsync" name="unsync" value=" " style="width: 600px;" />
<input type="hidden" id="titles" name="titles" value=" " style="width: 600px;" />
<input type="hidden" id="details" name="details" value=" " style="width: 600px;" />
<input type="hidden" id="adresses" name="adresses" value=" " style="width: 600px;" />
<input type="hidden" id="times" name="times" value=" " style="width: 600px;" />
<input type="hidden" id="participants" name="participants" value=" "
style="width: 600px;" />
<!--data for allerede oprettede posts-->
<input type="hidden" id="existsync" name="existsunsync" value=" " style="width: 600px;" />
<input type="hidden" id="sids" name="sids" value=" " style="width: 600px;" />
<input type="hidden" id="stitles" name="stitles" value=" " style="width: 600px;" />
<input type="hidden" id="sdetails" name="sdetails" value=" " style="width: 600px;" />
<input type="hidden" id="sadresses" name="sadresses" value=" " style="width: 600px;" />
<input type="hidden" id="stimes" name="stimes" value=" " style="width: 600px;" />
<input type="hidden" id="sparticipants" name="sparticipants" value=" " style="width: 600px;" />
</form>
</body>
</html>