Search Results

Search found 14829 results on 594 pages for 'sharepoint api'.

Page 83/594 | < Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >

  • Facebook graph api photo upload to a fan page album

    - by kielie
    Hi guys, I have gotten the photo upload function to work with this code, <?php include_once 'facebook-php-sdk/src/facebook.php'; include_once 'config.php';//this file contains the secret key and app id etc... $facebook = new Facebook(array( 'appId' => FACEBOOK_APP_ID, 'secret' => FACEBOOK_SECRET_KEY, 'cookie' => true, 'domain' => 'your callback url goes here' )); $session = $facebook->getSession(); if (!$session) { $url = $facebook->getLoginUrl(array( 'canvas' => 1, 'fbconnect' => 0, 'req_perms'=>'user_photos,publish_stream,offline_access'//here I am requesting the required permissions, it should work with publish_stream alone, but I added the others just to be safe )); echo 'You are not logged in, please <a href="' . $facebook->getLoginUrl() . '">Login</a> to access this application'; } else{ try { $uid = $facebook->getUser(); $me = $facebook->api('/me'); $token = $session['access_token'];//here I get the token from the $session array $album_id = 'the id of the album you wish to upload to eg: 1122'; //upload your photo $file= 'test.jpg'; $args = array( 'message' => 'Photo from application', ); $args[basename($file)] = '@' . realpath($file); $ch = curl_init(); $url = 'https://graph.facebook.com/'.$album_id.'/photos?access_token='.$token; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $args); $data = curl_exec($ch); //returns the id of the photo you just uploaded print_r(json_decode($data,true)); } catch(FacebookApiException $e){ echo "Error:" . print_r($e, true); } } ?> I hope this helps, a friend and I smashed our heads against a wall for quite some time to get this working! Anyways, here is my question, how can I upload a image to a fan page? I am struggling to get this working, when I upload the image all I get is the photo id but no photo in the album. So basically, when the user clicks the upload button on our application, I need it to upload the image they created to our fan page's album with them tagged on it. Anyone know how I can accomplish this?

    Read the article

  • WinVerifyTrust API problem

    - by Shayan
    I'm using WinVerifyTrust API in windows XP and I don't want any kind of user interaction. But when I set the WTD_UI_NONE attribute, although it doesn't show any dialog boxes, but it waits for a long time on the files that in fact wanted user interaction (I mean files which without mentioning the NO UI it will ask the user for that file). This is my code: WINTRUST_FILE_INFO FileData; memset(&FileData, 0, sizeof(FileData)); FileData.cbStruct = sizeof(WINTRUST_FILE_INFO); wchar_t fileName[32769]; FileData.pcwszFilePath = fileName; FileData.hFile = NULL; FileData.pgKnownSubject = NULL; /* WVTPolicyGUID specifies the policy to apply on the file WINTRUST_ACTION_GENERIC_VERIFY_V2 policy checks: 1) The certificate used to sign the file chains up to a root certificate located in the trusted root certificate store. This implies that the identity of the publisher has been verified by a certification authority. 2) In cases where user interface is displayed (which this example does not do), WinVerifyTrust will check for whether the end entity certificate is stored in the trusted publisher store, implying that the user trusts content from this publisher. 3) The end entity certificate has sufficient permission to sign code, as indicated by the presence of a code signing EKU or no EKU. */ GUID WVTPolicyGUID = WINTRUST_ACTION_GENERIC_VERIFY_V2; WINTRUST_DATA WinTrustData; // Initialize the WinVerifyTrust input data structure. // Default all fields to 0. memset(&WinTrustData, 0, sizeof(WinTrustData)); WinTrustData.cbStruct = sizeof(WinTrustData); // Use default code signing EKU. WinTrustData.pPolicyCallbackData = NULL; // No data to pass to SIP. WinTrustData.pSIPClientData = NULL; // Disable WVT UI. WinTrustData.dwUIChoice = WTD_UI_NONE; // No revocation checking. WinTrustData.fdwRevocationChecks = WTD_REVOKE_NONE; // Verify an embedded signature on a file. WinTrustData.dwUnionChoice = WTD_CHOICE_FILE; // Default verification. WinTrustData.dwStateAction = 0; // Not applicable for default verification of embedded signature. WinTrustData.hWVTStateData = NULL; // Not used. WinTrustData.pwszURLReference = NULL; // Default. WinTrustData.dwProvFlags = WTD_REVOCATION_CHECK_END_CERT; // This is not applicable if there is no UI because it changes // the UI to accommodate running applications instead of // installing applications. WinTrustData.dwUIContext = 0; // Set pFile. WinTrustData.pFile = &FileData; // WinVerifyTrust verifies signatures as specified by the GUID // and Wintrust_Data. lStatus = WinVerifyTrust( (HWND)INVALID_HANDLE_VALUE, &WVTPolicyGUID, &WinTrustData); printf("%x\n", lStatus);

    Read the article

  • Issues with Rails 3.1 API with Query String to Create action on Mac OSX Mountain Lion

    - by hjaved
    Hi I've been stuck on this problem for a while and would appreciate your help. I'm writing an API to allow an external source like a Browser Query String or a smartphone to enter some model User info in a form and hit the User create action to write the data to the db. Please tell me what I'm doing wrong with the code below. I've also observed that if I have code like @user = User.new(params[:user]), that this approach only works when a user enters their data within the form. And that if I have code such as @user = User.new( name: params[:name], location: params[:location], password = params[:password], email: params[:email]), that this code ONLY works for a Query string entry, but NOT both Query string AND regular form submission. Why is that and how can I write the code above in the Users Controller Create action, so that it takes care of both situations? URL used: localhost:3000/users/create?name=John&&[email protected]&&password=secret&&location=SanFrancisco&date=06122012 The date is of type string but it doesn't show up in the database. Why? Everything else does. UsersController.rb def create @user = User.new(params[:user]) if @user.save session[:uid] = @user.id redirect_to thanks_path, notice: "Welcome #{@user.name}!" else redirect_to root_path end end New User Form: <%=u.text_field :name, placeholder: "Name"%><br> <%=u.text_field :email, placeholder: "Email"%><br> <%=u.password_field :password, placeholder: "Password"%><br> <%=u.text_field :location, placeholder: "City"%><br> <%=u.text_field :date, placeholder: "Date"%><br> <%if params[:partner_id]%> <%=u.hidden_field :partner_id, value: params[:partner_id]%> <%end%> <button class="btn btn-large btn-primary">Enter</button> I also tried to create a separate method called remotecreate for User creation for something other than a regular web form. I entered remotecreate in the Query string but it didn't work. def remotecreate @user = User.create(name: params[:name], email: params[:email], password: params[:password], location: params[:location], date: params[:date]) if @user.save session[:uid] = @user.id redirect_to thanks_path, notice: "Welcome #{@user.name}" else redirect_to root_path end end Thanks!

    Read the article

  • Can't connect in C# and google spreadsheet api

    - by RockySanders99
    Trying to access google spreadsheets using their api. following their example, the code doesnt work, and its not obvious why. All I'm trying to do is to connect, and I keep getting back the same error. This is with their code set as of 4/15/10. Can anyone offer any suggestion on what I'm doing wrong? CodE: using System; using Google.GData.Client; using Google.GData.Extensions; using Google.GData.Spreadsheets; namespace google_spreadsheet { class Program { static void Main(string[] args) { SpreadsheetsService myService = new SpreadsheetsService("MySpreadsheet" ); myService.setUserCredentials("[email protected]", "xxxxxxx"); string token1 = myService.QueryClientLoginToken(); Console.WriteLine("token is {0}", token1); Console.ReadLine(); SpreadsheetQuery query = new SpreadsheetQuery(); SpreadsheetFeed feed = myService.Query(query); Console.WriteLine("list"); foreach (SpreadsheetEntry entry in feed.Entries) { Console.WriteLine("Value: {0}", entry.Title.Text); When I run this, it keeps erroring out at the myService.Query statement, with the following error: Google.GData.Client.GDataRequestException was unhandled Message=Execution of request failed: http://spreadsheets.google.com/feeds/spreadsheets/private/full Source=Google.GData.Client ResponseString=<HTML> <HEAD> <TITLE>Not Found</TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000"> <H1>Not Found</H1> <H2>Error 404</H2> </BODY> </HTML> StackTrace: at Google.GData.Client.GDataRequest.Execute() at Google.GData.Client.GDataGAuthRequest.Execute(Int32 retryCounter) at Google.GData.Client.GDataGAuthRequest.Execute() at Google.GData.Client.Service.Query(Uri queryUri, DateTime ifModifiedSince, String etag, Int64& contentLength) at Google.GData.Client.Service.Query(Uri queryUri, DateTime ifModifiedSince) at Google.GData.Client.Service.Query(FeedQuery feedQuery) at Google.GData.Spreadsheets.SpreadsheetsService.Query(SpreadsheetQuery feedQuery) at google_spreadsheet.Program.Main(String[] args) in C:\Development Items\VS Projects\VS2008\google_spreadsheet\google_spreadsheet\Program.cs:line 21 at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException: System.Net.WebException Message=The remote server returned an error: (404) Not Found. Source=System StackTrace: at System.Net.HttpWebRequest.GetResponse() at Google.GData.Client.GDataRequest.Execute() InnerException: Yet, I can take the url http://spreadsheets.google.com/feeds/spreadsheets/private/full and manually type it in with my username/password, and it works fine. Any suggestions? thanks rocky sanders

    Read the article

  • Can I use the whatthetrend.com API to get daily and weekly twitter trends?

    - by Charles S.
    The twitter API allows me to receive daily trends and weekly trends (in addition to current trends, of course) as either JSON or XML. Is there an equivalent with the whatthetrend.com API? I don't see a method/parameter at first glance but I wanted to see if anyone out there knew a way... http://api.whatthetrend.com/api There's a method to lookup trend definition by keyword so I guess I could use that based off the Twitter API but I'd rather just load all the data at once rather than have to remotely access the API every time I want to look up a definition. Thanks

    Read the article

  • What is the best API in any language for Audio and MIDI music application development?

    - by noneme
    What, in your opinion, is the best API to utilize in developing an application that handles both realtime MIDI and audio input and output? This would be for an application that is used in the process of making music as opposed to playing audio or MIDI files. I'm aware that this may be a subjective question, but if you know of an API that is dominantly used for these purposes, please share it. I'm agnostic about which language the API is for, and I also don't care about portability. The real concern is for an API that is well documented, well designed (e.g. thought out and intuitive to developers using it), and actively maintained. OS portability would be nice, but it is second to having an API/Language that meets the previous requirements. Please note that the emphasis is not on API's for sound synthesis or for composing music with code. It is intended for the handling of sound file and MIDI data in a real-time context.

    Read the article

  • Google Maps API - Marker not showing

    - by popnbrown
    I'm trying to add markers for every single row from a table, that sits on the page. The page is http://www.sravanks.com/first/2013ftcmap.php This is the JS code that's loading the markers: $(document).ready(function() { var mapOptions = { center: new google.maps.LatLng(39.740, -89.503), zoom: 7 }; var map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions); var infowindow = new google.maps.InfoWindow(); /* City Markers */ var cityCircle = new Array(); var i = 0; $.each($('.events tr'), function(index, value) { var name = $(this).find('td:first()').html(); var address = $(this).find('.address').html(); var linkUrl = "http://www.sravanks.com/first/geocode.php?address=" + address; $.ajax({ url: linkUrl }).done(function(data){ var json = $.parseJSON(data.substring(0, data.length-1)); lat = json.results[0].geometry.location.lat; lng = json.results[0].geometry.location.lng; var latlng = new google.maps.LatLng(lat, lng); var marker = new google.maps.Marker({ position: latlng, map: map, icon: 'map-pointer-medium.gif' }); google.maps.event.addListener(marker, 'click', function() { infowindow.setContent(name); infowindow.open(map, marker); cityCircle[i] = new google.maps.Circle({strokeColor: '#00FF00', strokeOpacity: 0.8, strokeWeight: 2, fillColor: '#00FF00', fillOpacity: 0.35, map: map, center: latlng, radius: 144841}); i++; }); }); }); /*Team Markers*/ var markers = {}; var teamName, teamNumber, lat, lng, content; $.each($('.list tr'), function(index, value) { teamName = $(this).find('td.name').html(); teamNumber = $(this).find('td.number').html(); markers[teamNumber] = {}; lat = parseFloat($(this).find('td.lat').html()); lng = parseFloat($(this).find('td.lng').html()); content = "Name: " + teamName + "<br />Number: " + teamNumber; markers[teamNumber]['latlng'] = new google.maps.LatLng(lat, lng); markers[teamNumber]['marker'] = new google.maps.Marker({ position: markers[teamNumber]['latlng'], map: map }); google.maps.event.addListener(markers[teamNumber]['marker'], 'click', function() { infowindow.setContent(content); infowindow.open(map, markers[teamNumber]['marker']); }); }); google.maps.event.addListener(infowindow, 'closeclick', function() { for(var i=0;i<cityCircle.length;i++){ cityCircle[i].setMap(null); } }); }); I've got no errors, but the Team Markers do not show up. The strange thing is that the City Markers do show up. Some more info, the City Markers ajax call is just to a proxy that calls the google geocoding api. Again the link's at http://www.sravanks.com/first/2013ftcmap.php

    Read the article

  • Google maps api v3: geocoding multiple addresses and infowindow

    - by user2536786
    I am trying to get infowindow for multiple addresses. Its creating markers but when I click on markers, infowindow is not popping up. Please help and see what could be wrong in this code. Rest all info is fine only issue is with infowindow not coming up. <!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <title>Google Maps Multiple Markers</title> <script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script> </head> <body> <div id="map" style="height: 800px;"></div> <script type="text/javascript"> var locations = [ ['Bondi Beach', '850 Bay st 04 Toronto, Ont'], ['Coogee Beach', '932 Bay Street, Toronto, ON M5S 1B1'], ['Cronulla Beach', '61 Town Centre Court, Toronto, ON M1P'], ['Manly Beach', '832 Bay Street, Toronto, ON M5S 1B1'], ['Maroubra Beach', '606 New Toronto Street, Toronto, ON M8V 2E8'] ]; var map = new google.maps.Map(document.getElementById('map'), { zoom: 10, center: new google.maps.LatLng(43.253205,-80.480347), mapTypeId: google.maps.MapTypeId.ROADMAP }); var infowindow = new google.maps.InfoWindow(); var geocoder = new google.maps.Geocoder(); var marker, i; for (i = 0; i < locations.length; i++) { geocoder.geocode( { 'address': locations[i][1]}, function(results, status) { //alert(status); if (status == google.maps.GeocoderStatus.OK) { //alert(results[0].geometry.location); map.setCenter(results[0].geometry.location); marker = new google.maps.Marker({ position: results[0].geometry.location, map: map }); google.maps.event.addListener(marker, 'mouseover', function() { infowindow.open(marker, map);}); google.maps.event.addListener(marker, 'mouseout', function() { infowindow.close();}); } else { alert("some problem in geocode" + status); } }); } </script> </body> </html>

    Read the article

  • Validating the SharePoint InputFormTextBox / RichText Editor using JavaScript

    - by Jignesh Gangajaliya
    In the previous post I mentioned about manipulating SharePoint PeoplePicker control using JavaScript, in this post I will explain how to validate the InputFormTextBox contol using JavaScript. Here is the nice post by Becky Isserman on why not to use RequiredFieldValdator or InputFormRequiredFieldValidator with InputFormTextbox. function ValidateComments() {     //retrieve the text from rich text editor.     var text = RTE_GetRichEditTextOnly("<%= rteComments.ClientID %>");     if (text != "")     {         return true;     }     else     {         alert('Please enter your comments.');         //set focus back to the rich text editor.         RTE_GiveEditorFocus("<%= rteComments.ClientID %>");         return false;     }     return true; } <SharePoint:InputFormTextBox ID="rteComments" runat="server" RichText="true" RichTextMode="Compatible" Rows="10" TextMode="MultiLine" CausesValidation="true" ></SharePoint:InputFormTextBox> <asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click" OnClientClick="return ValidateComments()" CausesValidation="true" /> - Jignesh

    Read the article

  • LIDNUG: Effective Silverlight with SharePoint 2010

    - by Sahil Malik
    Ad:: SharePoint 2007 Training in .NET 3.5 technologies (more information). This is a free virtual event that you attend right from your computer. I will be talking about using Silverlight in SharePoint 2010. Description: In this session Sahil talks about how to write, debug, develop, and deploy Silverlight applications effectively in SharePoint. The entire talk is almost no slides and all code, so there is plenty to chew on! Don’t miss!!Starts:Sunday May 02, 2010, 11:00AM Ends:Sunday May 02, 2010, 12:30PM More details Comment on the article ....

    Read the article

  • Getting many files from a SharePoint Document Library the easy way

    - by Stacy Vicknair
    As an individual who does not use Internet Explorer as their primary browser, there is a great feature that you may never notice that allows you to easily copy files to and from a document library: the Open in Windows Explorer link. In browsers such as Chrome or Firefox this link may not appear. I know this isn’t a major groundbreaking feature, but it’s really easy to overlook and it’s worth knowing about, especially when you need to create a local copy of a full document library. In this quick blog we’ll go over how to access this feature in both SharePoint 2007 and 2010. First, make sure you are in Internet Explorer. These options may not show in other browsers. In SharePoint 2007, browse to the document library you would like to access then select Actions > Open with Windows Explorer. In SharePoint 2010, browse to the document library you would like to access then select Library Tools > Library > Open with Explorer from the ribbon.

    Read the article

  • Security Issues When Creating Pages in SharePoint

    - by Damon
    I was speaking (or rather IM'ing) with Ben Collins a while back and he came across an interesting problem that I wanted to document for the sake of posterity.  If you have a SharePoint user who has permissions to create a page in a page library, but that user is having security issues trying to actually make a page, then it the security issue may be related to their access rights on the master page gallery.  Users who create pages must have at least restricted read access to the master page gallery for page creation to succeed. That is one of the joys of working in SharePoint. if something doesn't show up there is usually a good but obscure reason for it, but SharePoint certainly won't tell you outright why it is.  All I have to say is that I'm glad he ran into that issue and not me.

    Read the article

  • Slides, Scripts, and Photos from SharePoint Saturday New Orleans 2011

    - by Brian Jackett
    This weekend I presented “Managing SharePoint 2010 Farms with PowerShell” at SharePoint Saturday New Orleans.  This was my first time visiting New Orleans so I was excited for the experience.  A big thanks to everyone who attended my session.  I condensed the material a little but the slides and scripts below have additional material that we couldn’t cover.  Let me know if you have any comments, questions, or feedback.  Thanks. Slides and Scripts     Managing SharePoint 2010 Farms with PowerShell   Photos     <coming soon since the conference is still ongoing>         -Frog Out

    Read the article

  • Service Account Management in SharePoint 2013

    - by Sahil Malik
    SharePoint, WCF and Azure Trainings: more information My newest article detailing Service Account management in SharePoint 2013 is now online. Who thought such a simple need could have so many nuances. Hope you like it With this, I am going to do a break – not taking time off, but switching gears. My next series of Articles are going to focus on writing Mobile Apps for SharePoint and Office 365. And I intend to cover every single scenario, On Prem, Cloud, Xamarin, HTML5, Cordova, and Native. I will show Windows and iOS, I’m an android dumbass, but space/time permitting I may show cordova android – anyway, for an Android guru the articles will provide enough information get rolling anyway. Read full article ....

    Read the article

  • WSS Fails Installing On Step 5 Of The SharePoint Products and Technologies Configuration Wizard

    - by ptahiliani
    I've attempted to install WSS 3.0 with SP1 several times as both stand-alone and server farm with no luck on Windows Server 2008.  When I get to step 5 of Configuration wizard it begin installing and publishing services but on Step 5 I get the message "Failed To Register Sharepoint Services". The detail behind this message reads "An exception of type Microsoft.SharePoint.SPException was thrown". Then I Run the command psconfig -cmd configdb -create -database <whatever_unique_name> Click on Start / All Programs / Administrative Tools / SharePoint Products and Technologies Configuration Wizard Should work now (it did with me). PS: This was done on a Virtual Machine (VMware)

    Read the article

  • SharePoint Saved My Puppy

    - by Mark Rackley
    The SharePoint journeys video contest ends today, and I thought I’d submit my video about how SharePoint has changed my life. The video has not been approved yet for some reason, so I thought I’d post it quickly here… When it does get approved, please be sure to rate it.  Thank you SharePoint for giving me back my puppy… Maybe we can start a write-in campaign or something???  And be nice.. it’s all in good fun.

    Read the article

  • Speaking at SharePoint Saturday Cincinnati

    - by Enrique Lima
    I will be not only attending SPS Cincinnati, but also speaking. And I am very happy and excited about it! The topic: The difference between learning and training: Creating a SharePoint based Learning Management System The description: Training and learning have been defined as synonyms by many organizations. The difference is, training has focused on a classic and traditional model. Learning on the other hand, refers to achieving something from the receiving side of the story, not just delivery. In focusing on driving adoption it is important to have a strategy where learning is also part of the plan. This session focuses on how to create a SharePoint Learning Plan, and how to deliver the plan through the implementation of a Learning Management System. Come join us! More information about SharePoint Saturday Cincinnati can be found here: http://sharepointsaturday.org/cincinnati/default.aspx

    Read the article

  • SharePoint Scenario Framework

    - by Damon
    I've worked with SharePoint for some time now, and I like to think that I know all there is to know about it.  Deep down I know that's not true, but it's a fun delusion.  However, I found out yesterday that there is a mechanism in SharePoint called the Scenario Framework that has been around for a while but that I had no idea ever existed.  It is used to maintain state between multi-page web forms and helps manage the navigation between those pages.  If building out multiple-page forms in SharePoint is in your plans, you can find more information about the Scenario Framework on Waldek Mastykarz blog entry on the subject.

    Read the article

  • Google maps api v3 refreshing away markers

    - by Paul Peelen
    Hi, I am having problems with the google maps API V3. It seems that every time I load my page the maps load (including the markers) and then it does a quick reload and removes all the markers. Am I missing somehting? What am I doing wrong? Here is an example: http://www.PaulPeelen.com/wp-content/uploads/2010/04/SafariScreenSnapz001.mov this is my code: <script type="text/javascript"> <!-- var hash = "{{$sHashLocal}}"; var webroot = "{{$webroot}}"; var map; function initialize() { var latlng = new google.maps.LatLng(59.32045, 18.066902); var myOptions = { zoom: 13, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); return map; } function getMarkerInfo (infowindow, rack_id) { // Get all the racks $.ajax({ type: "GET", url: webroot+"ajax/getRack/"+hash+"/"+rack_id, cache: false, dataType: "html", success: function(html) { $("#rack_"+rack_id).html(); infowindow.setContent(html); } }); } $(document).ready(function () { map = initialize(); function attachSecretMessage(marker, rack_id) { var infowindow = new google.maps.InfoWindow({ size: new google.maps.Size(50,50) }); google.maps.event.addListener(marker, 'click', function(){ var ret = '<div id="rack_'+rack_id+'" class="rackDiv"><div class="rackDivLoading"><img src="theme/images/loader-small.gif" border="0"/><span>Hämtar data</span></div></div>'; infowindow.setContent(ret); infowindow.open(map,marker); getMarkerInfo(infowindow,rack_id); }); } function addPlacemark (lat,lng,title, rack_id) { var image = new google.maps.MarkerImage('http://www.google.com/intl/en_us/mapfiles/ms/micons/blue-dot.png', new google.maps.Size(32, 32), new google.maps.Point(0,0), new google.maps.Point(0, 32)); var shadow = new google.maps.MarkerImage('http://maps.google.com/mapfiles/shadow50.png', new google.maps.Size(37, 34), new google.maps.Point(0,0), new google.maps.Point(-4, 34)); var location = new google.maps.LatLng(lat,lng); var marker = new google.maps.Marker({ position: location, map: map, icon: image, shadow: shadow}); marker.setTitle(title); attachSecretMessage(marker, rack_id); } // Get all the racks $.ajax({ type: "GET", url: webroot+"ajax/getRacks/"+hash, cache: false, dataType: "xml", success: function(xml) { // Add the results $(xml).find("station").each(function () { rack_id = $(this).find("rack_id").text(); title = $(this).find("description").text(); longitute = parseFloat($(this).find("longitute").text()); latitude = parseFloat($(this).find("latitude").text()); addPlacemark(latitude, longitute, title, rack_id); }); } }); $("#addMark").click(function () { addPlacemark (59.32045, 18.066902); }); // Set size setPageSize(); }); //--> </script> I hope somebody can help me. Best regards, Paul Peelen

    Read the article

  • Setting value for autocomplete search field linked to Google Places API

    - by user1653350
    I have a web page where people will be able to enter multiple destinations. When they state they want to enter a new destination, the current field values are stored in arrays. If they choose to go back to a previous destination, the relevant values are reinserted into the form fields. I am using the search field linked to autocomplete as the visible display of the destination. When I attempt to put a value into the linked search field, the value is presented as if it is a placeholder instead of a value. Enter the field and the value is removed by the onFocus() event of the Google Places autocomplete add-in. How can I reinsert the value and have it recognised as a value instead of placeholder. field definition in the form <label for="GoogleDestSrch" class="inputText">Destination: <span id="DestinationDisplay2">1</span> <span class="required"><font size="5"> * </font></span></label> <input id="GoogleDestSrch" type="text" size="50" placeholder="Please enter your destination" /> initialise code for Google Places API listener var input = document.getElementById('GoogleDestSrch'); var autocomplete = new google.maps.places.Autocomplete(input); google.maps.event.addListener(autocomplete, 'place_changed', function() { fillInAddress(); }); attempting to reinsert value into search field when prior destination reloaded form.GoogleDestSrch.value = GoogleDestSrch[index]; Issue With Google Places <script language="JavaScript" type="text/javascript"> function GotoDestination(index) { var domove = true; if (index == 0) { index = lastIndex + 1; } else { if (index == -1) { index = lastIndex - 1; if (index == 0) { index = 1; domove = false; } } } if (domove) { if (index != lastIndex) { var doc = window.document; var pdbutton = doc.getElementById("pdbutton"); var pdbutton1 = doc.getElementById("pdbutton1"); if ((index > lastIndex)) { // move to next destination saveDataF(lastIndex); loadDataF(index); lastIndex = index; } else if (index <= lastIndex) { // move to previous destination saveDataF(lastIndex); loadDataF(index); lastIndex = index; } } } } var input; var autocomplete; // fill in the Google metadata when a destination is selected function fillInAddress() { var strFullValue = ''; var strFullGeoValue = ''; var place = autocomplete.getPlace(); document.getElementById("GoogleType").value = place.types[0]; } function saveDataF(index) { var fieldValue; var blankSearch = "Please enter"; // placeholder text for Google Places fieldValue = document.getElementById("GoogleDestSrch").value; if (fieldValue.indexOf(blankSearch) > -1) { fieldValue = ""; } GoogleDestSrch[index] = fieldValue; } function loadDataF(index) { if ((GoogleDestSrch[index] + "") == "undefined") { document.getElementById("GoogleDestSrch").value = ""; } else { document.getElementById("GoogleDestSrch").value = GoogleDestSrch[index]; } } // -- Destination: 1 * Type of place // input = document.getElementById('GoogleDestSrch'); autocomplete = new google.maps.places.Autocomplete(input); google.maps.event.addListener(autocomplete, 'place_changed', function () { fillInAddress(); }); //]]

    Read the article

  • Youtube API upload - Incomplete Multipart body error

    - by Blerim J
    Hello, I'm trying to upload videos in Youtube through HttpWebRequest. Everything seems to be fine when uploading following the example given in API documentation. I see that request is being formed correctly, with content and token sent but I receive "Incomplete multipart body" as response. Thanks Blerim public bool YouTubeUpload() { string newLine = "\r\n"; //token and url are retrieved from YouTube at runtime. string token = string.Empty; string url = string.Empty; // construct the command url url = url + "?nexturl=http://www.mywebsite.com/"; // get a unique string to use for the data boundary string boundary = Guid.NewGuid().ToString().Replace("-", string.Empty); foreach (string file in Request.Files) { HttpPostedFileBase hpf = Request.Files[file] as HttpPostedFileBase; if (hpf.ContentLength == 0) continue; // get info about the file and open it for reading Stream fs = hpf.InputStream; HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url); webRequest.ContentType = "multipart/form-data; boundary=" + boundary; webRequest.Method = "POST"; webRequest.KeepAlive = true; webRequest.Credentials = System.Net.CredentialCache.DefaultCredentials; MemoryStream memoryStream = new MemoryStream(); StreamWriter writer = new StreamWriter(memoryStream); //token writer.Write("--" + boundary + newLine); writer.Write("Content-Disposition: form-data; name=\"{0}\"{1}{2}", "token", newLine, newLine); writer.Write(token); writer.Write(newLine); //Video writer.Write("--" + boundary + newLine); writer.Write("Content-Disposition: form-data; name=\"{0}\"; filename=\"{1}\"{2}", "File1", hpf.FileName, newLine); writer.Write("Content-Type: {0}" + newLine + newLine, hpf.ContentType); writer.Flush(); byte[] boundarybytes = System.Text.Encoding.ASCII.GetBytes(string.Format("--{0}--{1}", boundary, newLine)); webRequest.ContentLength = memoryStream.Length + fs.Length + boundarybytes.Length; Stream webStream = webRequest.GetRequestStream(); // write the form data to the web stream memoryStream.Position = 0; byte[] tempBuffer = new byte[memoryStream.Length]; memoryStream.Read(tempBuffer, 0, tempBuffer.Length); memoryStream.Close(); webStream.Write(tempBuffer, 0, tempBuffer.Length); // write the file to the stream int size; byte[] buf = new byte[1024 * 10]; do { size = fs.Read(buf, 0, buf.Length); if (size > 0) webStream.Write(buf, 0, size); } while (size > 0); // write the trailer to the stream webStream.Write(boundarybytes, 0, boundarybytes.Length); webStream.Close(); fs.Close(); //fails here. Error - Incomplete multipart body. WebResponse webResponse = webRequest.GetResponse(); } return true; }

    Read the article

  • Amazon Product API: "Your request is missing a required parameter combination" on Blended ItemSearch

    - by Daniel Schaffer
    I'm having some problems trying to do an ItemSearch on the Blended index using the Amazon Product API. According to the documentation, Blended requests cannot specify the MerchantId parameter - and indeed, if I try to include it I get an error telling me so. However, when I don't include it, I get an error telling me that my request is missing a required parameter combination and that a valid combination includes MerchantId... what the hell? Here's the XML response: <Items xmlns="http://webservices.amazon.com/AWSECommerceService/2005-10-05"> <Request> <IsValid>False</IsValid> <ItemSearchRequest> <Availability>Available</Availability> <Condition>All</Condition> <Keywords> home theater pc and other geekery</Keywords> <ResponseGroup>Similarities</ResponseGroup> <ResponseGroup>SalesRank</ResponseGroup> <ResponseGroup>OfferSummary</ResponseGroup> <ResponseGroup>Small</ResponseGroup> <ResponseGroup>Images</ResponseGroup> <SearchIndex>Blended</SearchIndex> </ItemSearchRequest> <Errors> <Error> <Code>AWS.MissingParameterCombination</Code> <Message>Your request is missing a required parameter combination. Required parameter combinations include MerchantId, Availability.</Message> </Error> </Errors> </Request> </Items> The failing requests are being sent as part of batches with other requests that are succeeding. I'm using REST to send my requests, so here's an example of a request: http://ecs.amazonaws.com/onca/xml?AWSAccessKeyId=-------------& ItemSearch.1.Keywords=Mates%20of%20State& ItemSearch.1.MerchantId=Amazon& ItemSearch.1.SearchIndex=DVD& ItemSearch.2.Keywords=teaching%20Lily%20various%20computer%20related%20skills& ItemSearch.2.SearchIndex=Blended& ItemSearch.Shared.Availability=Available& ItemSearch.Shared.Condition=All& ItemSearch.Shared.ResponseGroup=Small%2CSalesRank%2CImages%2COfferSummary%2CSimilarities& Operation=ItemSearch%2CSimilarityLookup& Service=AWSECommerceService& SimilarityLookup.1.ItemId=B000FNNHZ2& SimilarityLookup.2.ItemId=B000EQ5UPU& SimilarityLookup.Shared.Availability=Available& SimilarityLookup.Shared.Condition=All& SimilarityLookup.Shared.MerchantId=Amazon& SimilarityLookup.Shared.ResponseGroup=Small%2CSalesRank%2CImages%2COfferSummary& Timestamp=2010-04-02T17%3A18%3A05Z& Signature=---------------- Any ideas as to what I'm doing wrong?

    Read the article

  • how to add URL link in a SharePoint list?

    - by George2
    Hello everyone, I am using SharePoint 2007 + Windows Server 2008 with SharePoint 2007's publishing portal template. I am using List Web Part with Data Sheet view. I want to know how to make a column as a URL link (i.e. show text in the cell, and can associate a link with the text in each row for the specific column), i.e. when user clicks the text in the specific column of a specific row, the user will be directed to the link associated the text. thanks in advance, George

    Read the article

  • sharepoint 2010 search error give me correlation id and event viewer is empty and no log there

    - by saber tabatabaee yazdi
    we have a farm of SharePoint 2010 that worked properly since last week. we configure and start the search service last week and it is also worked and when we test it with some criteria , worked , and results appear for us so we are very happy. but after few days when we search , occur this error: after that we delete application service and reconfure. and now when we open any document libraries occur this error: but lists open correctly without any error An unexpected error has occurred. Troubleshoot issues with Microsoft SharePoint Foundation. Correlation ID: 5becf903-d13e-4490-a23c-d7e4f68ca769 please help us.

    Read the article

< Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >