Is it possible to create popup and exit redirect on aws S3 static website? - amazon-web-services

I just want to know if its possible to create those signup forms that popups when visitor visits the site?
And could visitors be redirected to another site once they click back or "x" button?

If you can see an html page you can include the javascript code to do that.
The javascript asociated with button click event shoul call window.location.href = "http://yourothersite.com";

Related

screen scraping a coldfusion page with login screen

I need to screen scrape ( with permission) and intranet website and extract data from the page. This is a cfm application with a login. The user needs to login, make a selection from the dropdown, click on a link and then arrive at the page which needs to be scraped.
I know using cfhttp method = get, will get the contents from the remote url. but how do i handle the login part? and automating the click on the dropdown and click on all the links.
please advice on what can be used to achieve this? TIA

how to send a url with facebook like button?

I have page which has the url like the following.
http://example.com/?f=chatter
It has three links.
When I click on a link it details page is display. Which has the url like
http://example.com/?f=chatter&aid=6
But this url does not appear in the browser address bar. It displays in a textbox on its details page. The url in address bar remains the same http://example.com/?f=chatter
My page is of .tpl
Now I want to add the facebook like button to the details page which will share the link of that details page which is displaying in the textbox.
But when I click on the facebook like button, it share the link which is in the address bar of the browser.
{$url} this contains the details page url which is displaying in the textbox.
I have used the following code of the facebook like button.
<iframe src="//www.facebook.com/plugins/like.php?href={$url};send=false&layout=standard&width=450&show_faces=false&action=like&colorscheme=light&font&height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe>
Where in href I have place the {$url}.
I don't know if this will be useful to you but I'm using a jquery plugin that is unfortunatly not free ($5) called jQuery Social Share Buttons plugin
Although I'm having problems getting the facebook like button to include a popup which allows posting the url to my feed (keep getting 'Unknown RPC service: widget-interactive' error when trying to implement), I was able to get the twitter button to post the url.

django login popup

I've been trying to figure out how to do a modal login in django and have been having some trouble. Is this possible? It seems like it should be. I imagine the solution involves writing a view that takes a POST request and returns some JSON.
Are there any examples out there of how to do this in a clean way?
The easiest way I've found is to do the following:
Write a simple standalone login view
Display this view on your pages as an iframe using a javascript modal dialog (I recommend Colorbox).
Because you're displaying an iframe, you don't have to worry about ajax sends etc. The iframe can just post data and redirect normally.
On a successful login, redirect the iframe to a 'success' page. After a few seconds, have that page send a message to the parent window, which can then close the modal box and make any necessary changes to itself.

Facebook iframe app. it is possible refresh when user log out from other browser tab

I have an iframe application.
When a user and another page and log in to facebook site, the application page is reloaded by facebook.
But, I want to reload the page in the logout state also.
Here is the scenario:
A user enters my iframe application and authorizes my app and successfully enters my app.
While using my app, the user opens my app (or fb site) in another browser tab.
The user logs out from facebook site in the last browser tab.
When user logs out from facebook, I want to automatically reload my application page in the browser.
How can I do this?
Have a look at FB.Event.subscribe, I think you should be able to use it to reload the page when the user's session changes.
Add something like this to your FB.init:
FB.Event.subscribe("auth.sessionChange", handleSessionChange);
...and the handleSessionChange callback function would look something like this:
function handleSessionChange(response) {
if(!response.session || response.session.uid!="$user_id"){
window.location.reload();
}
}
Unfortunately, your options are limited as communication with an IFRAME is very constrained. This may help you:
http://www.dyn-web.com/tutorials/iframes/refs.php

How can I store the number of facebook Likes of a particular url in my own database?

Lets say I am having 5 news articles on my website and 2 registered users. Each news article is having an FB like button. I want to insert the username and article name in my own database whenever the user likes one of the articles. How can this be done?
If it would have been a normal submit button (instead of FB like button) then i would have simply added an onclick event to call a javascript function which in turn sends an ajax request to a php file which inserts the row in the database with the required field.
Can I add an onClick event with FB like button? if not then is there an alternative?
A slightly hack-y way to go about it would be to attach an onclick event handler to the iframe container to trigger an event whenever a user clicks like on page.
I haven't worked with the API that much, but can't you use this: edge.create -- fired when the user likes something (fb:like)? http://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/