disable certain navigation links in popup window (external website) - javascript

Hi I am opening an external website in my pop window. I would like to disable certain links in that popup.
i.e. I am opening http://www.yahoo.com in pop and I want to disable some links in that pop-up so that who ever visit yahoo.com using my website, will not able to click on some links...
Is it possible? any idea?

It is impossible to run JavaScript on another domain because of the same origin policy. imagine someone opening up your bank account in a new window/frame and altering the links to transfer money to their account. ;)
You can screen scrape the content with your server and redisplay it, but you have to worry about proxying all of the relative links.

If you are creating a popup using the standard window.open you can manipulate the DOM of that document. See here for more information on how to do that (towards the bottom of the page). But this is fairly limiting to writing stuff to that page. I suppose you could render the link in an iframe and inject some javascript to manipulate it?

Related

Is there any way I can open new tabs on Chrome without javascript?

I am creating a website and on the website, I need about 10-20 more tabs on the user device,
I know how to do this with javascript but the user can disable javascript on the browser which basically stops the entire point of the website, is there any way to do it without javascript (maybe sending a header to Chrome or something that opens a website in a tab)?
There is no way to do that without JavaScript to open multiple tabs at once.
You can make a link open a new tab with the target attribute when clicked by the user, but that is limited to one new tab for one user interaction.
maybe sending a header to Chrome or something that opens a website in a tab
Even if that would be possible with some kind of trick, it would likely be fixed in an update in the browsers, because this will this would be definitely be abused by dubious websites.
Well, the pure HTML way to do that is through the target attribute of any hyperlinked element (A, FRAME, FORM), which shall contain the name of the window that should receive the content of the hyperjump.
Example:
<!--These two hyperlinks redirect the URLs to the same tab-->
local clients
inernational clients
<!--This hyperlink redirect the URL to its own tab-->
providers
Anyway, I warn you not to abuse of this form of forced navigation, because it can chase your user out of your website: The user should be left as free as possible to chose to open or not new tabs/windows. And 10-20 tabs seems to me an overwhelming amount of tabs.

How to redirect to parent window after logging in from iframe window?

I am using an Iframe window to display the login form of another website. And what I want is the user should go to that particular site after logging in(even if logging in fails, any click on any link in that iframe should take the user to that site in the full window(parent window).
As long as the links (within the iFrame) are part of the other page, you can't "hijack" their target. You would have to have the means and ability to modify the target attribute of each link to point to _parent or use javascript to reference the window.parent.
Based on what you're saying (you're logging in to a different domain and the page is not part of your site) this wouldn't be possible without implementing some kind of proxy where you could modify the contents between page visits.

Script add exception to IE popup blocker

Looking for other suggestion or a way to script adding an exception to the IE popup blocker.
Here is the situation.
We have a domain MyDomain.com that is where our core SP2010 site sites. Then we have 2 other domains that direct to other applications within our organization. ie site1.MyDomain.com and site2.MyDomain.com. We have a page in the SP2010 site that loads an iframe containing a table of contents page from site1.MyDomain.com. clicking one of the links will popup a window with detail information from site1.MyDomain.com for your selection. Then links on that popup page takes you to site2.MyDomain.com. The problem is that if the user has their popup blocker enabled and has their banner notification turned off then they are not notified that a popup was triggered.
I would like to be able to run a script on the home page of the SP2010 page to detect if *.MyDomain.com has been added to the popup blocker exclusion list if not then prompt the to add the site. I don't know if it's possible but any feed back would be greatly appreciated. We are looking for a solution that would consider the end user to be a blathering idiot and still have this work. You know how marketers business requirements are.

How to add Return Home button to external sites?

I am developing a website with some links to some pages on external websites (belonging to the same company).
The client wants to add a way to easily return to the home site, i.e. something better than just using the browser's Back button, and something better than just opening the external links in a new browser window.
Seeing as I can't control the content of the external pages, I'm guessing that I will have load those external pages into a frame somewhere along the line.
So is there a way for a link to load a local page with a frameset, with the external page loaded into one of the frames? (Then we could have a "Return Home" button in the other frame.)
Or is there a better way to accomplish this? I could stretch to a bit of JavaScript if pushed...
Thanks,
Stewart.
You'll need to display the external websites in an iframe, with a link at the top (outside of the iframe) back to your site. Note that some sites employ "iframe busters" which will get rid of your iframe.
The best option is to open in a new tab - it's how people expect the web to work.

Is there a way to open a link in a frame and suppress all popups on the external site?

I'm wondering if it's possible to open a link to another site, in a frame (or by some other means), and suppress the 1-2 popups that load on the external site.
I don't think there is an easy way to accomplish this. Your best bet would be to have a page on your server act as a proxy for fetching the page from the other site, then modify the html you get back to remove pop ups. Not an easy task, but possible. As a POC, you could explicitly target the popups you know about by looking for the page url they open.

Categories

Resources