I have an iframe which when you press a button goes to the main page
self.redirect('/')
but the problem is that the content of the main page is shown inside the iframe, and I want to show it in the main window (not in the iframe)
How can we get that?
If I understand your question. You like to redirect to your mainpage and remove the iframe.
In your iframe You have to use a button to initiate a redirect and some javascript:
<input value="ReDirect" id="button" onclick="parent.parent.location.href ='... url ....';">
See also this question : How to dynamically close an iframe after form submit in JavaScript
Related
I have a simple website made with react, I am trying to add some links at the top of a Boostrap modal, so that when clicked, it takes you to a specific section of the modal.
for example a link looks like this,
<h4>Infected Olecrenon Bursitis</h4>
and the div I want it to take us to looks like this,
<div className="text-left border border-info rounded" id="iob">
//some code
</div>
Before opening the Bootstrap modal, we are on this page link. www.page.com/primary/guide Then we click an img which then opens the modal.
If I try it with the above code, the modal disappears and the screen fades, and my url now says
www.page.com/primary/guide/#iob
want to create a portfolio/projects page where user click on thumbnail it goes full screen and other page comes in
i guess i can achieve this using pose-flip
https://codesandbox.io/s/fourth-react-pose-example-qj92p problem is how i can do it with multiple elements on page
this is the sample site
i'm new to react, when i click the thumbnail how to remove all others ( fade ), we can do it simply in jquery not selector
i have a big problem. I'm working on a side menu app, and i need to open another view from another view. I tried to use $state.go and $location.go but when i open a window, this window have the back button of the navigation bar. I want the window will open like when i click on a item on my menu, so with the sidemenu icon on left of the nav-bar. What is the method to open a "new window"?
when i open the new view with AngularJS $state.go and $location.path:
1
when i open the same with href="url" in my HTML sidemenu :
2
I need to open the new view like the second screenshot using angularJS. How can i hit it?
If you don't need navigation back button (eventually on condition) you can use this code in your index.html:
<ion-nav-bar class="bar-stable">
<ion-nav-back-button hide-back-button="{{options.hideBackButton}}">
</ion-nav-back-button>
</ion-nav-bar>
When you need to hide the back button set options.hideBackButton = false;
Another way is to use: $ionicNavBarDelegate.showBackButton(false);
I have a problem with showing a youtube video through an iframe.
When I click on the youtube icon, the page is being reloaded OR the page scrolls to the top. The page scroll only when the iframe is not on top of the page, but for example under a list or after some element.
How do you prevent the page to reload or scroll to the top after clicking on the youtube icon?
If I move the iframe to the top, the reload and scrolling isn't occurring. When the iframe isn't on top of the page, the page reloads or scrolls to the top.
Not sure why iframes do this but I found if, before adding in the iframe, save the body's scrollTop property in a variable and then, after the iframe is added, set the body's scollTop to that variable. The trick is to reassign the value in a setTimeout function. See the following:
var scrollTop = document.body.scrollTop;
element.appendChild(iframe);
setTimeout(function() {
document.body.scrollTop = scrollTop;
});
I have a main menu on my website for every page except the login page. In my html, I have:
<div ng-if="$root.location !== '/login'">
<mainmenu></mainmenu>
</div>
This works in general, except the main menu flashes when I load the login page. I suspect this is because the menu is shown, then the variable $root.location becomes /login, then the main menu disappears.
How do I do this so the main menu doesn't flash?