I am new to google extension..
What I want to do in my extension is to display an icon at somewhere in page (Not in the address part nor toolbar but in the left center of the page).
When user clicks on the icon, the new window should open with specific url.
I have already created to do the same by placing icon in toolbar and it works fine.. But I want to display the icon to left-center of the page..
then I tried to display an icon to left center of page by adding element to document.body.. That help me to display the icon but not able to call the browser action or to create new tab on it..
Any suggestion??
Thanks,
Mahesh
I'm just making the comment an answer...
Using target="_blank" on the anchor tag worked for me
<img src="icon.png" />
Related
I have an iframe which simply displays a slideshow of our different products. It's hosted on the same server, it was just easier to use an iFrame.
Each slide contains a link to the current product on the slide, i couldn't use an href on the anchors, so instead i used " onclick='window.top.location.href =...' ". (This also prevents right clicks for the links.)
So my question is can i enable middle mouse clicks (and right clicks) for the links so that we can open them in a new tab, or would i have to go back to using an href.
Note - The reason i used onclick instead of href, was because with href the link would open inside the iframe instead of changing the top page. Is there another way to circumvent this and still keep normal clickability? Thanks in advance guys :)
Why you are not using a tag with target attribute?it will open link in new window.
add target="_blank"
I am trying to make a hyperlink to a specific part of another page, but it wont do anything. Here is how I have it set:
ENG
and on the "eng" page I have
<section class="about" id="about">
But when clicking on link, nothing happens.... If i use middle mouse to open link in new tab (or right click-open in new tab or new window) it will do exactly what I want it to do in my currently open tab, not in new one.
Try ENG
My blog url: https://fashionindiar.blogspot.com
I am unable to open the label links on my stand alone home page, in the same tab / window. Actually, by mistake I checked the respective checkbox under the Link button on menu bar earlier, after which I am unable to revert. However, the checkbox shows unchecked.
Also, please note that I have Social Media buttons on my home page, which should open in new tab / window (I have already activated the respective option under Link button, and I don't want to tamper with it).
Please help me to open all label links (on my home page) in the same tab / window, and not in any new one.
Looking forward to your reply.
Thank you.
Shampa Sengupta
To open links in the same frame as it was clicked remove the attribute target="_blank" from <a> tags or change it to target="_self"
i have a long page, where near the bottom I have a "post on facebook" button. when the user clicks this the FB.UI dialog from the facebook javascript sdk pops-up. This is all working fine except that the page scrolls back to the top of the page where the dialog is showing.
i have the set just under the tag as facebook recommends. I've tried moving this to the part of the page where i need it but the page keeps scrolling back to the top
Any idea how i can get the facbook dialog to show where the current page scroll position is?
You'll want to use the position:fixed; attribute within the element that contains the Facebook dialogue. Check out this link for further information and examples.
Sorry about the wording for my question title.
I have a basic HTML anchor tag that when clicked it is suppose to bring up a dialog box to download a file from a differnt website.
I am using an attribute of target="_blank" so that when my hyperlink is clicked, I don't navigate away from my main window.
This is all the easy part (if it was so easy I wouldnt be here though).
When I do the above though, and click on the hyperlink, an annoying blank window pops up with my download dialog box behind it.
How do I get rid of that annoying blank window and keep only my download dialog box on the screen?
Below is the HTML I'm working with...
<a href="http://www.fake-domain-name.com/downloads/setup.msi"
target="_blank">
<img src="images/download.png" alt="download file"/>
</a>
Lose the target="blank".
You know that is supposed to open a new window/tab, do you?