Force URL to open in tab in IE7 - internet-explorer-7

I have a link in my webdatagrid as follows:
I open the link using following:
var PageURL = "XYZ.aspx?XYZID=" + rows.get_cell(8).get_value();
window.open(PageURL, "", "menubar=1,resizable=1,location=1,scrollbars=1");
Now my problem is that, it works perfectly fine when the settings of IE& is
"When popup encountered:>>> Always open pop-ups in a new window and Always open pop-ups in a new tab
but when the setting is "Let Internet Explorer decide how pop-ups should open" it creates a problem and it opens in a new window and that window has lot of issues.
Please help me to force URL to open in new tab only.

This is not possible. This can only be controlled in the browser and not by the website.
Detail:
You (webdeveloper) can specify if a link should open in a new window. The visitor can specify if a new window should open in a new browser window or in a new tab.

Related

Open all links in a new tab in PDF file created with pdfTron

I want to open all links from my PDF file generated with pdfTron and react in a new browser window. If I open the document with a PDF viewer and click on a link, it works fine as the link opens in a new browser tab. But if I initially open the PDF in the browser, when clicking on a link, the new page opens in the same tab and I need it to open on a new tab.
Adding target="_blank" on the <a> didn't help although this is working on the HTML template which is generated before the PDF file is created.
Doing it from native JS (using window.open) was also impossible.
Is there a way I can add an event listener maybe from pdfTron to tell all the links to open in a new tab? Please advise, thanks!
Unfortunately, you can't specify this in the PDF itself. You can, however, try modifying your links to point to an intermediate page which opens the link in a new tab. PDFTron has a guide on how to do something like this here:
https://community.pdftron.com/t/how-do-i-open-a-pdf-link-a-url-hypelink-in-a-new-browser-window/172

How to avoid blocking new window popup in AngularJS

I've an issue on opening new page window in my Angular JS project if popup is being blocked.
Do you have any solution on bypass popup/new window blocking in IE > 8
Note; It's not a button click event to open new window.
If you are referring to the window popup using window.open() you can't specially if the user has blocked popup's from their browser that popups blocked icon at the rightmost part of the url bar or in the browser settings then you can't do anything about it.

How access weblements in a child window in IE8 browser

I am trying to access web elements in a child window in IE8 browser.
I am not able to access any of the element in that child window, I tried Developer tools (F12) in browser, macros to get X path, page source to get ID/name for the elements but nothing is working there. Could some one help me please
What do you mean by :-
nothing is working there?
Be specific.
You can open the website in Firefox or some other advanced web-browser to get the element's selectors and later run the automated scripts using IE 8 driver.
Check the code in the answer provided for a similar question -
Java: focus is not on pop-window during window handling
EDIT: Other approaches--
Try the following steps (Manually):
Open main page, hit F12 to open developer toolbar.
Perform action that opens the popup.
Focus on popup and hit F12. You should see a developer toolbar.
Check this screenshot - http://snag.gy/pPXLX.jpg
As an alternative you may also try getting the URL of the popup and open in a new tab in the main browser window and then do F12 to inspect any elements.

Switching control in tabs in Selenium

While doing automation for my Web page through selenium,when i try to click on a button called "Learn More" it opens a page in a new tab and automatically closes the old tab.(This is a specific case for IE). The main problem is that i am not able to click on the link present in the new tab, the control is not getting switched to the new tab.
I tried all the possibilities of switching windows and switching tabs , but both has not helped me.
And as a result I end up with "No Such Window Exception."
Please help.

Is there any way to open new tab(or popup, or window) with certain html content in silverlight?

I have a grid filled with some data in my silverlight4 app.
I want to have "Show this as html" button for the grid.
I can generate the html, export it to savefile dialog, but that's not what i need, because in this way user has to perform more actions, like:
click 'export'
enter filename
wait for download
find file open it in browser
Is there any way to create tab, or window, or popup with certain html content in it? (so it would be like
click 'show as html'
?)
Thanks in advance,
Ilya.
The problem is that you can't save it anywhere locally without user interaction (or elevated privileges).... so don't save it locally.
I can think of two options:
1.
Write the data back to the server
Open a normal popup web browser window, pointing a generated temp HTML page.
To open another HTML browser window from Silverlight you can use HtmlWindow.Navigate specifying _blank as the target type.
2.
Use the ability of Silverlight to execute any Javascript to open a popup with the content.
From Silverlight you can use ScriptObject.Invoke to execute arbitrary Javascript.

Resources