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
Related
I'm programatically creating links to download files of different formats like .csv and .yml.
My code is
<a href="/organs/#organ/#policy/#folder.Name/#file.Name" download>#file.Name</a>
so lets say these links get created:
https://localhost:44372/organs/Heart-Lung/03-15-2020/data/fakedata.yml
https://localhost:44372/organs/Heart-Lung/03-15-2020/data/testdata.csv
the .csv works as it should, I click and it downloads. the .yml however opens a new web page at that link and then says that it can't be found
I'm really not sure what I'm doing wrong, is there a way force it to download or should I be doing this a different way?
I ended up using javascript to do this, based on https://wellsb.com/csharp/aspnet/blazor-jsinterop-save-file/
most of the code is the same, but I changed the link to this to pass in the variable and to keep it as a clickable link that doesn't go anywhere
<a href="javascript:void(0)" #onclick=#(() => DownloadFile(file.FullName))>#file.Name</a>
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 am using this code to show a tooltip on hovering a link:
<span id="zing" class="zing-wrapper">Keyword<span>This is description here</span></span>
The tooltip works but when I click on the link, it does not work. Please help.
I have put the code in js fiddle here:
http://jsfiddle.net/y9gb6LLj/
Hi jsfiddle uses frame to display resulting code and browser will prevent document.location.href behavior inside the frame. Your code is working as expected to me, copy your code and paste into html file, open it in browser and click your link, you'll redirected to google.
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.