How can I stay in the current Tab when using tabview when the page is reloaded
Add information about current/opened tag to url.
www.example.pl#contact-tab
after reload check which tab was open and open it again
Related
I have a whatsapp contact link on my page. I want to open it in a new tab. But if it is already opened, i want to go to this tab (the already opened) instead of open a new tab.
I tried:
<a target="_blank" href="https://api.whatsapp.com/send?phone=">Whatsapp</a>
But every time it opens in a new tab, any ideas?
For a better solution, try opening the whatsapp tab in a new popup instead of the browser tab.
As a page can not keep track of other pages/tabs open on the client side.
You can use a popup to open up the whatsapp page, and can control it through javascript/jQuery
The latter page can also control the main page through javascript commands like parent.
Try rewriting the link as ,
Whatsapp
We have following link on our page:
Link
It has a click event bind to it which just toggles a class and returns false. When I am opening the page first time in browser, the click event works fine. But after reloading the page or opening it second time (in other tab or same tab, not in other window), the click of this link is reloading the page.
Adding href="javascript:void(0)" fixes the problem but why is this behaving like this on empty href?
I have a web-page and withing that page I am using an iFrame. this iFrame contains two buttons previous & next. On next button click I change the source of iFrame to lets say page2.html and on previous button click i change the source back to page1.html. Issue is when i click the browser back and forward buttons it causes the iFrame to navigate (depicting the functionality of those above buttons). How can I avoid this, that is on browser back button click previous page should be loaded (of browser's rather iframe's).
Thanks
I got the solution to the problem. I have to replace the url of the frame by window.location.replace(newurl).
in this case it doesn't add into browser history.
I have a iframe-1 and it contains another iframe-1-1.[1]
Inside iframe-1-1 which contains a link.
When a user click the link:
It should open a new tab (For instance, Firebug/or Chrome).[2]
But it does not work. How can I do that?
[1] Why I have this question: because I code a webpage, it is embedded in Facebook, and I call FB.dialog it will show me a dialog is a iframe too.
[2] It works properly if I use wheel button to click.
You can't instruct a browser to open a new tab. The best you can do is to use target="_blank" and hope that the user is using a browser that will open a tab and not a new window.
I am opening links on a page into an IFrame. But if the user right clicks and selects open in new window that will ruin the look I want since it will not have the parent page holding it. So is there a way to open the page as i have it working now when the user clicks on the link but if they choose to open in new tab to have it load the current page all over again in the new window with the link they selected loaded into the IFrame.
Thankyou
You can change all the links to use javascript instead of direct HREFs. This will mean users can't actually 'open in new tab' but will have to click them like normal. Use an 'empty' href & an onclick event to set your iframe's location property.
Link
Should work
Try dropping the following code into the pages you're trying to open within the frameset:
if (top.location.href == self.location.href) {
top.location.href = '/path/to/frameset/page.aspx?somethingindicatingwhichpagetoloadiniframe';
}
This will determine if a parent frame is present and if not, redirect to the frameset page in which you should preload the original page in the iframe.