I there a way to show popup texts while clicking the youtube video iframe code ?
<a href='login.html?sid=0&keepThis=true&TB_iframe=true&height=240&width=650' class="thickbox" title='test'>
Have you try to call Javascript on the onclick attribute
<a onclick="alert('test')"
href='login.html?sid=0&keepThis=true&TB_iframe=true&height=240&width=650' class="thickbox" title='test' >
This will open the pop up and then go to the URL (tested on Firefox 7).
Edit: Another solution is to do the href location after the pop up :
<a onclick="alert('test');document.location.href='login.html?sid=0&keepThis=true&TB_iframe=true&height=240&width=650'"
class="thickbox" title='test'>
Related
using this HTML commands in vscode:-->
<a>href="page2.html"/>page2</a>
<a>href="https://www.google.com">Google </a>
when i refresh the page it is showing web address insted of showing only link ,where we can click
to enter on specifice link address.
It is showing following result:-->
href="page2.html"/>page2
href="https://www.google.com">Google
You need to move href inside the <a> tag, like this:
page2
Google
I'm learning HTML.
I've following code piece:
<a href="#B" id="specialClass" class="primary-btn icon-cart" data-one="#A" data-five="google.com" data-ten="#C" target="_blank">
<span id="pressButton">New Button</span>
</a>
When I press button based on slider and data-five gets triggered, I for some reason open in a new tab mywebsite.com/google.com instead of google.com.
What am I doing wrong?
If it is an address outside your web page you have to put the full path with https://google.es
<a target="_blank" href="https://google.es">Google</a>
I have a simple app that fetches images from Unsplash API. I would like users to click on the image, and download it and also maybe for the image to open in a new tab too.
The urls.regular is just a simple url like https://images.unsplash.com/photo-1543332164-6e82f355badc?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&ixid=eyJhcHBfaWQiOjE3OTUzOH0
After reading other issues on stackoverflow, I added "download" at the end of my a tag.
<div>
<a href={urls.regular} title={description} download>
<img
src={urls.regular}
/>
</a>
</div>
I have also tried the following in my a tag:
href={urls.regular}
target="_blank"
rel="noopener noreferrer"
download={urls.regular}
You should define onclick event for the a tag.
<a href={urls.regular} title={description} download onclick="onClick(urls.regular)">
function onClick(url) {
window.open(url, '_blank');
}
I am working on localhost:
I have kept
`<a href="www.facebook.com" target="_tab">
<div> </div>
</a>`
On button click it should redirect and open in new tab. But it shows following url in next tab
http://dev01.dev/Umesh/www.facebook.com
ie. localhost/current<dir>/url
rather
url
Your target is wrong, it should be
target="_blank"
change www.facebook.com to http://facebook.com. Also there is no such thing as _tab what you want is _blank.
I have used frameset and frames to connect 3 html pages.The problem arises when i click on link provided in any of 3 html pages ,those link only opens in their respective frames.so help me so that i can open those link on whole page rather than inside a frame
Use the attribute target=_parent in the a elements.
Where you'd usually use:
<a href="http://www.example.com">
Or to open in a new window:
<a href="http://www.example.com" target="_blank">
Instead, specify the name of your frame as the target:
<a href="http://www.example.com" target="nav">