asp.net javascript Always open single instance of application from email link - javascript

I am working on an application (asp.net) where links to my application go through an email. Now one of the requirements is that only one instance of the application must be open for a user. Now when a user clicks on a link from an email I want to be able to spot if my application is already open in one of the browsers, grab it, change location and focus on that. Expecting it to be a javascript solution.

Related

How to Submit URLs to Googlebot without verifying In Javascript Code

Is there a way or api to register Url on Google? For example, when a page was created in the project, its address will be automatically submit to Googlebot.
There isn't really a way to submit it automatically (otherwise there would be no captcha).
However why do you want to submit every page to GoogleBot? It is sufficient to point the bot to your project's address once the project goes online (if Google didn't already found your project). GoogleBot is regularly visiting your project, automatically adding/removing new and old pages in your project (as soon as there is somewhere in your project a link pointing to the new page).

How to track on aspx page that link clicked from email

In my email inbox I got URL(http://localhost/sample.aspx) of a website when I click on this link this website open in browser.
Now I have to track on sample.aspx that this website coming from link clicked in email through JavaScript.
How can I track that.
For example using document.referrer we can track last visited website URL.
Thanks
The only mechanism you have for this would be to add a parameter to the querystring, so something like http://localhost/sample.aspx?emailClicked=true
You can then read this on the web site using JavaScript (or anything else for that matter) and track it as you see fit.
You cannot use Document.referrer. Because nothing referrered this link (in the case of outlook for example) or if it did (for example gmail, etc.) you don't know what the URL(s) of the hundreds of referrer's would be.

How to run JavaScript and click button

I have the next task - I have a page where we have some interaction logic:
After a user clicks a button, my script redirects the user to another site where it must be populate 2 textfields then click button, after redirect to new page it must click on another button.
My project is based on ASP.NET MVC4.
My questions are:
May I do all of this?
If yes, how can I redirect to another page and run my script
P.S.: Second web site isn't my site and everything I know is id of buttons where I need to click.
Elaborating on my comment
You cannot do this in a normal browser. You could write a bookmarklet or two that would navigate and click but there is no script you can write in a web page that will do what you want for security reasons. A long time ago, it was possible in IE to load a banking site into an iFrame and script and monitor user interaction to steal credentials. This has been blocked.
If you save an HTML page with the extension HTA, it can be loaded from harddisk in windows and will have relaxed security so you could load the other site into an iFrame and script the interaction. This is likely not what you want.
The last method is to use for example CURL to get the foreign page, insert stuff and submit the form to the foreign site and return the result. This is not recommended either.
So the question to you is: Why do you need this and are there other ways to do what you want
1) location.href = "http://another.page.com"
2) impossible for security purposes

How to prompt user to accept website certificate using javascript

Mainly the scenario is that there are two websites. The two website implements single sign-on. So if you login to the first website, you are considered logged on as well on the other. The problem is that the first website tries to get information such as XML from the second website; however, some users do not go to the second website in order to be automatically prompted by their browsers to accept/deny the certificate for that website.
Is there a way through javascript that if the user goes to the specific page in the first website, it will check if their browser has the certificate from the second website. If not, it will prompt the user to install the certificate from the second website in order for the contents of the page in the first website to fully load.

Facebook Feed Dialog simplified?

I'm trying to add a share button or "feed dialog" as Facebook now seem to be pushing, to posts on my website. I'm basically looking for a way to simply allow users to click the button and be sent to the share preview page to post to their timeline or a friend's timeline etc.
The problem is that I don't really need an app (or at least I don't see the need in an app) and I'd like to avoid using their deprecated sharer url method.
What are my options? Can I use the feed dialog method without creating an app? I've tried going through their documentation but it just confuses me.
I'm not fussed whether it's JavaScript that opens a popup or if it redirects to a separate page (provided a redirect url can be provided to return users to the original page on my website).
you definitely need an app for the FB.ui feed dialog, but the user does not have to be logged in. Without an app, you can either use the sharer.php in a javascript popup, or you can use a like and/or send button. Just make sure to include Open Graph metadata in your page.
https://developers.facebook.com/docs/reference/plugins/send/
Be aware that you should also use an app (id) with the like or send button.

Categories