Open email link in an existing open window - hyperlink

We send out a confirmation email on completed registration. User need to click a link to confirm the registration, this link opens up a new window. Bog standard procedure...
How can I get the new window to open up in the existing window (or close the old window)?
[Update, not sure if I was clear enough.]
When I click on the confirmation link I want it to open or replace the window I still have open from the registration process.

You can't control the user's email client (and this is a good thing), so you cannot direct how it opens links.
You could use a script on the "old" page (the one used to enter email address, profile details, etc.) to poll your server and do something once registration is confirmed. If the user closes this page before that happens, e.g. opens another link on the site, this works well by not moving them where they don't expect.
The user would still have the registration page open, so simply put instructions on that along the lines of "email address confirmed, would you like to now 1) do this, 2) that, or 3) something else" (all links).

Use the target="_top" attribute, i.e.
linktext
That will solve your problem

Related

Connecting visitors in different browsers

We are tracking a forgot password workflow action using adobe site catalyst. The flow happens something like below
User requests for forgot password
He provides the email address and clicks on create new password
New password generation like is send to his email address
User clicks on this link and generates a new password
First 3 actions occurs in the same browser. The 4th activity can occur in the same browser or a different browser. Because of this, site catalyst considers that user as a different one (different visitor ID) and considers that as a totally different visit. Ideally the number of users who completes activity 4 should be less than that completes 1,2,3.
But for us, we are seeing more users who completes activity 4 which could be because of this different visitor issue.
Can someone please suggest a better approach to solve this?
You might want to try overwriting the Visitor ID.
I do not know how your site works in the backend, but generally, and theoretically (as I have yet to be asked by clients on to implement this):
Extract the Visitor ID when the user provides the email address and clicks on create new password. You might want to check the appendVisitorIDsTo (Cross-Domain Tracking) function out and see how the Visitor ID query parameter is implemented.
Send the Visitor ID along with the email address to your backend controller that spits out the template forget password email.
In the template forget password email, append the extracted Visitor ID as a query parameter in the reset link.
In DTM (if you are using DTM), modify your Marketing Cloud Visitor Service tool enable this configuration: overwriteCrossDomainMCIDAndAID.
When the user clicks on this reset link, the Visitor ID should be the one that is initially created for the user.
You might want to read this answer as well.

Ruby on Rails: Prevent users back to login form after logged in successfully

Ok. I have a login page. After I entered the email and password correctly and it redirects to me to the user profile. When I hit the browser back button, it also redirects to the user profile which works fine. But the problem raises when let's say if I enter the email or password wrongly, it says "email/password incorrectly", and I enter second time correctly it redirects me to the user profile, but when I hit the browser back button, the page will show "Comfirm form resubmission". This doesn't make sense.
"Confirm form re-submission" has nothing to do with Rails. This is Chrome trying to help you and/or your users.
A POST request is by definition an operation that alters data. Executing a POST a second time, unintentionally, may mess things up. Imagine paying twice for the same product.
As Rustam A. Gasanov pointed out in his comment, you really shouldn't bother much with the behavior of the back button in this case.

Rails: Specify email account that mail_to will open

I'm relatively new to Rails and would like to place a button on the admin-only part of my website that will open my company gmail account with the addresses of all of the registered users pre-populated in the 'bcc' field.
I almost have the mail_to helper working for this purpose except the mail_to link opens my personal gmail account instead of my company account.
Is there a way to use rails to trigger the log in to a specific gmail account and to pre-populate the "to" field as well?
I think, the link opens your personal gmail account just because you have it open in another browser window or tab.
AFAIK, Gmail does not allow to open different accounts in different windows at the same time. (Probably I miss something.)
Therefore, to make link open your corp account regardless of everything, the link handler should forcibly log out the current Gmail session and start a new one.
I don't think that you really want this behaviour (I mean closing the current session in such a rude way).

Email Link Unable to open on outlook

In my project i integrated html email for reset password option.User click on link and if user submit his email he will get mail having link to reset his password.
The link is opening on Gmail. But the same link is not working when I open in Out look. It is non clickable mode.
Is html email won't workout on Outlook? or coding any change required to integrate.
Please reply?
Finally I resolved the issue. In my web page having some commented code. When I removed the commented code now the mail is coming properly and all the links are working. I believe this commented code has some influence in terms of security concern of outlook.
So when ever write the mail function etc need to make the page is very clean and all unwanted comments etc should be removed.

Twitter oauth authorization in a pop-up instead of in main browser window

I feel incredibly stupid for even asking this since the answer might already be under my nose but here it goes:
TweetMeme has a Re-tweet twitter widget that publishers can place on their blogs. When a user clicks on the widget, it pops open a window which allows the user to authenticate themselves with twitter and then re-tweet.
This seems to use some special Twitter oauth popup form factor - unless there is something fancier happening under the surface to authenticate the user.
The pop-up window looks like this:
http://twitpic.com/1kepcr
I'd rather handle an authentication via a pop-up rather than send the user to a brand new page (for the app I'm working on) and they seem to have the most graceful solution. Thoughts on how they did this?
I think that the process is something like this (I assume that they have used php on server-side):
First it opens a jQuery-like popup, but it's not strictly related to twitter sign in functions.
The real sign-in process begin when you confirm that popup, so it open new popup, with some php inside, that # hold a session.
Those scripts ask to twitter the request tokens, using site's application params, and save them into $_SESSION array.
If it's all-right, twitter send you to twitter authenticate page (https://twitter.com/oauth/authenticate), and after you have inserted your login params, twitter send you to the callback page defiend by that site. Here there is another php page that request access tokens, and save them into $_SESSION array. If it's all-right now the site has params that he needs for querying your profile, so last scripts inside popup refresh opener window (main site) and close himself.
Now main window has all the interesting params inside $_SESSION array.
Check this useful library for all the server-side work.
All they're doing is opening a page http://api.tweetmeme.com/share?url=someURL&source=tweetmeme in a new window (using target _blank), then starting the process from there.
EDIT: I was looking at the wrong retweet button. For your specific example, clicking the retweet button first opens Tweetmeme page http://tweetmeme.com/ajax/partial?... in a new window. Clicking yes then initiates the OAuth process by sending you (still in that window) to https://twitter.com/oauth/authenticate (with appropriate parameters).

Resources