I have 2 controls on SharePoint page one is yammer embed feed and 1 content editor webpart with REST API call.
When I refresh page multiple times with some duration then it is throwing error as "yam.request is undefined". Please note I am using platform_js_sdk.js for REST API.
#Yammer team: can you please try and check issue with platform_js_sdk.js file?
Generally, having two yammer feeds on the same page doesn't work well, whether it be with embed or the rest api. One workaround is to use a page viewer web part which hosts the individual pieces of functionality.
Related
I need to do some screen scraping on a web page where the content I need is generated by AJAX. On the initial page there is a table with 4 tabs. When you click on any of the tabs the content of the table changes. I need the content from the 3rd tab only.
I have used the google chrome 'Inspect Element' tool to see what the requests and post data was and I can get the information I need when I put the information (session id and a lot of other cookie data as well as post data) from the inspect element result into a PHP curl request. But this only works for the 30 minutes that the session lasts. Does anyone know of a way I can get to this information?
I wont reproduce the code here but I will point you to the answer.
Its within this book:
http://www.amazon.com/Webbots-Spiders-Screen-Scrapers-Developing/dp/1593273975/ref=dp_ob_image_bk
A must buy for someone doing what your doing.
In the end I used htmlunit to get the content I needed. I also found the HTMLUnit Scripter very useful to help generate the Java code required.
I am developing an addon using Firefox's Addon SDK (v. 1.11). My extension dynamically creates an iframe on each website and then loads an html file which includes other resources such as images, font files, etc. from the add on's local directory.
Problem
When loading any of such local resources (i.e.: "resource://" schema), the iframe fails to display them and a message is thrown:
Security Error: Content at http: //www.XXX may not load or link to
resource://XXX
This is a security measure introduced on Firefox 3. When developing without the Addon SDK, the way around it is declaring a directory with "contentaccessible=yes", making the directory's contents accessible to anyone, including my add on. However, I have not been able to find similar functionality using the Addon SDK. Is there a better way of using local data on an iframe that my addon creates and inserts into a page?
I don't think you can directly load an iFrame that points to a resource inside your URL. The browser complains because it's either breaking same origin policy or cross site scripting one. I can't remember which one right now.
if it is html content you want to load you can always inject it into the DOM and then send a message to the document object using the events API to display your custom html. I've done this in the past and it works.
so from main.js send a message to content script which will then inject your iframe html into the DOM and then you can send the document object a message to display it.
I hope this helps.
Not sure if this was the case when you posted the question, but it appears that "resource://" should no longer be used with the Addon SDK.
If you're using the resource inside of an HTML file in the extension, you can reference it locally, otherwise you should use data.url('whatever.jpg') and pass around that value as needed.
Full info is here: http://blog.mozilla.org/addons/2012/01/11/sdk-1-4-known-issue-with-hard-coding-resource-uris/
Community -
I'm stuck for couple days on this and decide to go with a iFrame solution and a regular embedded page with a basic reCaptcha plugin using a Page.IsValid {} on the server functionality.
Basiccaly I have an older WebForm ASP.NET 2.0 clients website with a Modal Dialog implemented using a Ajax/JSON call to a MailSend WebService and now integrating a clients wish having a reCaptcha functionality within the modal dialog gets a pain.
After several trials with some basic code and all over not completed code pieces on several blogs around the net I do give up - I go to create a separate page with a regular send to friend mail form and will call it from the parent page with jQuery in a iFrame.
Did anyone had some more luck consuming a reCaptcha Validate Web Service within a modal dialog without a Postback or without using the iFrame way?
I'm thankful for any idea.
Martin
Allright. Me and my co-worker gave up on validate re-captcha thru web service. We finished the task with a iFrame and a jQuery FancyBox modal dialog solution. It solved our problem and it looks good. But I will come back to do the research and try the first way to solve as well at a later point.
My website uses ajax.
I've got a user list page which list users in an ajax table (with paging and more information stuff...).
The url of this page is :
/user-list
User list is created by ajax. When the user click on one user, he is redirected to a page which url is : /member/memberName
So we can see here that ajax is used to generate content and not to manage navigation (with the # character).
I want to detect bot to index all pages.
So, in ajax I want to display an ajax table with paging and cool ajax effetcs (more info...) and when I detect a bot I want to display all users (without paging) with a link to the member page like this :
JohnBob...
Do you think I can be black listed with this technique ? If you think so, could you please provide an alternative solution by keeping these clean urls and without redeveloping the user-list (without ajax) ?
Google support a specification to make AJAX crawlable:
http://code.google.com/web/ajaxcrawling/docs/specification.html
I did an experiment and it works:
http://seo-website-designer.com/SEO-Ajax-Google-Solution
As this is a Google specification, you won't get penalised (unless you abuse it).
Saying that, only Google support it at the moment (AFAIK).
Also, I believe following the concept of Progressive Enhancement is a better approach. That is, create a working html website then make the JavaScript enhance it
Maybe use the urls with an onclick to trigger your AJAX scripting? Like
Some URL
I don't think Google would punish you for this, you primarily use JScript, but you do provide a fall back for their bot, so your site doesn't get any less accessible.
EDIT
Ok, I misunderstood. Then my guess would be you basically have two options:
1. Write a different part of your site where bots end up, or,
2. Rewrite your current site to for example always give a 'full' page, with an option to only get, say, the content div. Then you can get only the content with JavaScript, but bots will always get a nice page.
Google Calendar provides a way to insert your Google Calendar into a web page using an <iframe>. Is there a way to insert this data into a web page without having to use the <iframe>?
I know that there are ways to do this using the Google API, but is there any way that I can put that code directly into my page without the need to use the <iframe> or rewrite the entire source code and call the Google API?
Actually you can just make it an object and it will validate. For the Google calendar in particular, all you have to do is change "iframe" to "object" (don't for get to change the iframe break too), change "src" to "data", and remove the frameborder and scrolling tags and all is good. The only drawback is that objects are not supported in IE....
I'd say you'd get what you want with restylegc.
You can check the strategy the developer used and insert into your page.
It basically uses curl to get the entire webapp and rewrites links dynamically so that it's in the middle of some request.
This also allows you to restyle the calendar and add custom javascript.