anchor links in emails not working after visiting once - html

So this question has been asked before, but the javascript solution doesn't work for me if I am simply emailing links to members. Here is an example of what I am talking about. I run a social network. When, for example, a user comments on another users profile, I want to email the user who isn't logged in and provide them a link to see the comment. Usually the link would be an onpage link with a # along with an id (example
The first time it works great, but then if you try to click the same link again, or even a link with a different # such as #2100 then it will no longer scroll to the id, once it has previously scrolled to an id.
I have read solutions to this issue, using a click event in javascript, however, how I don't think that that will work when sending out email notifications.
So the scenario is we email someone with a link https://www.domainhere.com/userprofile#1819 and the check it, but the next day we email a similar link with a different # such as https://www.domainhere.com/userprofile#1914 and when they arrive at the page, they don't move from the top of the page. Not sure why this is happening, or how to find a way around it. I've tried adding a unique ID, etc.
Anyone know how to make it so each time a user clicks these links in emails, they will arrive at the anchor? Even if they click the same link, perhaps because the first time they clicked the link in the email, they didn't have enough time to review the content, well once they visit that page, it doesn't matter what the # is, they stay at the top of the page.
The code is very simple. I am using "> as the anchor, and typing into the browser url the name of the page plus #numberhere - It works once, after that it doesn't work. Even if the number is different, ie. a new comment is emailed to the user.
I hope someone can help
Thanks

Related

Tie tracking clicks link to a href syntax and image

I need help with this scenario:
I have a tracking clicks link (provided by someone / mandatory) that I
want to tie it to a clickable image so that, when visitors click on
that image, they will enter another page of the website and all clicks
traffic be taken in consideration by that tracking link.
I'm a complete noob and I want to know if that is possible and how (some example) with HTML / java or anything else.
Thank you in advance.

When are forms autofilled in Chrome?

I'm confused about how Chrome decides what forms to autofill. By autofill I mean the inputs are highlighted in yellow and already completely filled in when you land on the page (see picture below). I do not mean autocomplete which is where the input is blank and you get a suggestion only when you start typing in it.
Here's the autofill rules as I understand them:
If your form is located on its own url, e.g., http://mysite.com/login
Your form is present on page load and is NOT loaded via ajax
Comparing my site with Dropbox's we both have a login page: http://localhost/login vs. https://www.dropbox.com/login which satisfies rule #1. The login form gets autofilled for both of us.
My problem is with rule #2. On Dropbox's homepage, www.dropbox.com, they have a "sign in" modal (see picture below) that gets autofilled. On my homepage, http://localhost, I have an identical modal which does NOT ever get autofilled.
I can't figure what the deal is here, can someone chime in? Is it just a localhost vs. real URL issue? If so, how do you explain why http://localhost/login gets autofilled?
When you log into a new site chrome will drop down its notification bar at the top and ask you if you want to save the password, if you tell it "Never" it wont ask again and it wont ever autofill
To get form fields to autofill like street, address, etc, a good answer by kmote
How to trigger Autofill in Google Chrome?,

New Timeline Like Button Behavior

On the new style Page Tabs, the Like button no longer re-freshes the page. This breaks the existing workflow for "Like-gates", where the signed request is checked on the server. Like the page, page refreshes, boom - the tab now updates to the "Liked" state.
Will there be any kind of event fired when user clicks thew new Like button? Or is this kind of gating no longer possible?
it's a bug that the page is not refreshing after being liked. Here's the bug reported:
https://developers.facebook.com/bugs/228778937218386?browse=search_4f500194bc1bd0293819428
However, I managed to do a workaround to detect if the page is still not using timeline by looking for an album called "Cover Photos" on the album list of that page. Here's a sample:
http://graph.facebook.com/-page_id-/albums?fields=name
You don't need a token unless the page isn't published yet.
The problem with this approach is that some pages still don't have cover picture yet, but it's the minority.
This problem is now fixed by Facebook. See here:
http://developers.facebook.com/bugs/228778937218386
So everyone can relax.

Open Window that has been put in tab or other options?

I'm hoping that someone may be able to help me out.
My Home page (Home.html) has a link to a mp3player located at (mp3.html)
On the mp3player page there is a link back to Home.html
If the user clicks on the link to the Mp3 player I would like for the music to continue to play even if the link to home.html is pressed.
What I would like to avoid is having multiple tabs from being opened if the user would re-click one of these links.
Also I would like to have the appropriate page to open when it's link is pressed instead of being locked in a tab and not displaying.
The mp3 player isn't affected by being refreshed.
I would prefer not to have different tabs open if at all possible.
This really got me stumped. I've tried different things out only to either be stuck choosing a tab or loosing the music from playing.
Thank you.
You can program your site with AJAX, so index page won't be reloaded but supplemented by content loaded be demand - Google Mail is a good example. Not a task for beginner, though.
You can use HTML frames (see examples) and load index and player at the same time in one tab. Very easy and may fit your needs, but makes your site harder to link to.
I'd go with the AJAX version as well, it's a nicer user experience. If there's a player somewhere in another tab, that's pretty annoying for the user to find if he wants to turn it off or change a track. Check out the Sixtyone and how they're solving the problem.

is using <a href=" ... " target="window_name"> not a good practice?

Sometimes a user will click on a link on a page, and it seems that there is no reaction -- nothing is loaded. It turns out that all the links on that page is targeting a window name, such as "news_content". The user previously already clicked on a news headline, and so when the user now clicks on another news headline, that window (usually another tab nowadays) will load the news, but the original tab is still the one being shown. To the user, this seems like nothing is happening.
Are those websites using <a href=" ... " target="news_content"> ? Is it a good idea to use something like that, or can it be changed a little bit so that the focus will go to that tab instead of staying at the original tab?
(is it better that the browser always switch to the target tab? if so, then this problem looks like will be solved).
In my opinion the user should always be in control of whether a link opens in a new window or not - If they're anything like me with numerous tabs endless new windows links are a mess.
What you seem to be asking is why the browser stays at the original page when a tab is updated with content, its simple, it sees it as another webpage, say you had a page that had realtime updating, your browser would not switch to that as it sees you are on another page - for all it knows you could be reading an article, watching a video etc.
All it takes to realise a different tab/window has updated is a little bit of awareness. With windows they would generally open over the current content, however as tabs are in one window this is not possible an it remains closed, but updated.
EDIT: In response to the title... I believe it to be better practice than opening something brand new each time however feel it should be the users choice whether to load a single new tab or stay in the same one. Hope this helps.
One caveat to add to the conversation.
I only use target= when I know the content is destined to be in an iframe and I don't want the link click to stay in the small window.
For example the graphs I embed here : http://webnumbr.com/stackoverflow-questions
Link behaviour should generally be left to the user to control. In some situations, a case can be made for target="_blank" (especially now that Firefox, at least, has a "New pages should be opened in: A new tab" option), but setting all links to open in the same new window is just bad.
I, for example, hate waiting for pages to load, so I'll read down a page middle-clicking each link that interests me, which will queue them up in a series of new tabs. Five interesting links become five tabs, each loaded in the background while I'm reading the first article, so no waiting. If you make all five open in the same window/tab, though, then each one disappears when I call up the next and not only do I have to 'pick one, wait for it to load, read it, go back to the original article, repeat', but, if I don't notice that this is what's happening, then I'll also need to go back and make a second pass through the original page to re-find the links to the lost documents (or, more likely, just say "not worth my time" and never read them).
Forcing newly-opened tags to the front has a similar problem: I opened it in a new tab because I want it to load in the background while I continue reading the original document. Don't subvert my intention. I cleared the "When I open a new tab, switch to it immediately" checkbox for a reason.
Yes, these websites are using target. Well. I can't imagine in which set of circumstances using the target attribute may be useful. But perhaps there's one. I haven't come across it.
Look, always switching to another tab solves the problem you describe, but it creates others. The biggest one is that switching to another tab may come as a surprise. Usability is by and large about never surprising the user. By the way, I greatly enjoyed the book "Don't make me think."