I have a small problem.
I'm using iframe to insert the banner (with link to the outside website).
<iframe src="http://wifi.tucado.com/ads/001.html" name="i001" target="_blank" frameset frameborder=0 id="i001" scrolling="no"></iframe>
The problem I have is when I click on the banner INSIDE the frame it opens a page INSIDE a frame and I want it to open it in new window (or at least in the parent one).
Is there any way to do it without js or jquery?
If not, what should I do in jquery to make it working? I was trying to find an answer here, but found just very specific questions which don't face my problem directly.
Thanks for any help.
If you can control the source file that is loaded inside the iFrame (http://wifi.tucado.com/ads/001.html), try adding a target="_top" or target="_blank" in the links there.
Related
When Links in the Page/Posts in my website are clicked, they correctly open in a new tab. But when the Anchor Texts or Page Jumps targetted to Top or any specific spot in the Page is clicked, that is also opening in a new tab.This may be because, I have inserted the Code '' in the Head using the Plugin Insert Headers and Footers, (after reading some tips like this) How to prevent the Page Jump Links from opening in a new Tab. Thanks for any help
Take a look at the target attribute for the <a> tag:
<a target="_self" href="">MyLink</a> = Open in the same tab window
<a target="_blank" href="">MyLink</a> = Open in new tab or window
If this doesn't work for you, then there's probably a bug in the plugin you're using... You probably either want to fix it or find another solution that suits your needs.
I have a menu bar that links to local webpages that is working fine except that when I click on the link on the menubar it goes to the webpage in question leaving the webpage with the menubar, but I wish to load the page below the menubar so the user can this use the menubar to navigate. Should I be using iframes? sorry haven't used HMTL5 in quite some time any help is much appreciated.
Neil.
<div class="menu">
Home
Index of Services
Schedule
Examples
</div>
<div class="content">
This page is to help you organise
</div>
Yes, you need frames. Or, the most common, to have the same menu code on all htmls, because with frames your url won't change unless you do some tricks.
If you don't want to duplicate code you could use PHP. Then you could create an index.php with the menus and with includes to the page content.
Edit:
You can also do it with some JavaScript but it also has the same problems with the url. The site will also not work if JavaScript is disabled.
Edit2:
The tricks for frames and javascript I said before can be achieved without url rewrites and with plain HTML+CSS+JS is with anchors.
Basically you change your urls to anchors with the page name, and when the page is first loaded you check this hash so the correct frame opens when someone enters your url like http://mypage.com/#examples. You can access and set the hash with window.location.hash.
So your code would look like:
<div class="menu">
Home
Index of Services
Schedule
Examples
</div>
<div class="content">
This page is to help you organise
</div>
For both with or without frames you need a JavaScript event attached to each menu item.
With frames the JS basically changes the frame url when the user clicks on the menu.
Without frames you use xhr to download the html, and then, if you successfully downloaded the html, you delete everything inside div.content and replace with what you downloaded with innerHtml.
For both solutions you need to add a JS that checks the hash when you first load the page to update the displayed page accordingly.
As for PHP or other server-sided "script" any beginners tutorial will explain how to do it.
I have a task where:
I have a frame which contains some external url content.
This externale content has a list of several links to some articles.
My task is to open each of these links in a seperate window, when clicked.
My code is something similar to this:
I want to open each of the links within ibnlive to open in a new window, instead of the same window.
Could anyone please help or suggest me on this, or please do suggest alternatives if there are any
http://www.emanueleferonato.com/2007/08/22/create-a-lightbox-effect-only-with-css-no-javascript-needed/
You can add target="_blank" on the links you want to open in new window
For example
asd
Try adding target="_blank" in your <a> tag
It should look like this:
Here
Instead of using target="_blank" use target="_parent"
Link
I'm using watir-webdriver to do multi-browser front-end automation test. Here I got a question. When the driver go into the first iframe of the page, it can get out, to find elements outside iframe, but if driver go into the iframe inside one iframe of the page, it can not go out and find the element of the outside page. the structure may look like this:
the main page:
<div>
<iframe src='a.html'></iframe>
</div>
a.html:
<div>
<iframe src='b.html'></iframe>
</div>
when web driver go into the b.html, and find elements in it, it can not get back to the main page.
Is anyone familiar with watir-webdriver can figure this out??
Thanks so much!
To change focus back to main page from an iframe:
#browser.frame(:index, 0).locate
My site supports exporting data in a few ways, and one way i via iframe.
<iframe src ="http://www.conanstats.com/Feeds/IFrame.aspx?Guild=30&EventCount=15" width="270" height="400">
<p>Your browser does not support iframes.</p>
</iframe>
Currently the problem is that when it's shown in a web site it's going to have its own style, is there any ways for it to inherit the style from the page it's being shown in. Or do I need to make url arguments to make this happen
An iframe is technically a different browser window with its own DOM and associated CSS imports. If you want to style the iframe's content put the CSS you would like to use in the file the src property is pointing to.
If it is pointing towards an ASP file change it in there.
You could have your page take a parameter which it then uses to decide which local style sheet to load...