Change Button Function After html site loaded on Iframe - javascript

I have an application in which I loaded .html file inisde a iframe on button click.
On In Progress Click app inside .html file loaded in iframe.
Above picture is of Iframe. On click Close a pop up appear.
Now I want to override the functionality of this CLOSE MODULE Button.
For example: On click this button i want to reload the parent application.
I have tired below code but its not working.
$('.notify-popup-prompt-button').on('click',function(){
console.log(123);
location.reload("https");
})

I resolved the issue, by changing in JavaScript using by .htlm file.

Related

Open Extrernal HTML page inside Angular Dialog

I am working on single Page application with Angular and Bootstrap.
At the top of the application there is button HELP. When user will click, Popup should be open with Help Content which is another HTML file.
Using ngDialog i am able to display the external Help Html file inside the dialog. But this HELP HTML file contains few hyperlink for navigation. So when i clicked those hyperlink , the main application's url is getting changed instead of changing in the HELP HTML page inside the dialog.
Any reference or help on this issue ?

Redirect/Change the Hyperlink using javascript

I have a page with a iframe in it. On the main page there is a menu. On click of a menu item page gets loaded in to the iframe. There are many hyperlink in the loaded page. Now those hyperlinks should be opened in the same iframe.
When some one clicks the hyperlink it will load a page in the iframe.
My question is :
instead of loading the page which is defined in the src="" of hyperlink I want a different page to load after the user clicks the hyperlink.
I need the java script to change the src="" parameter.
I am working in PHP.
You need to call a javascript function on click of hyperlink and in that javascript function you need to redirect to different url, return false in onclick event of hyperlink
open
<script>
function openURL(){
window.location.href="http://google.com";
}
</script>

how to avoid loading the source for iframe

I would like to improve loading performance for a page that has a button to trigger a popup initially hidden on the page (uses 'modal' component from twitter bootstrap). This popup body contains an iframe, which source is loaded on the page inital load adding about 30-40% more time to load, however. The iframe source is not needed to be loaded till the button is clicked which brings up the popup with the iframe. How can one avoid loading the iframe source on initial page load? ...only load the iframe source when the button is clicked? Can JS be used here? If so, then how or what method/library? Is there a better approach than make popup with iframe hidden in the page to improve loading time? Thank You
This is possible with JavaScript (no extra libraries required).
Simply use a function to set the src/display the frame when a link or button is clicked.
function loadIFrame(frameID, url) {
var frame = document.getElementById(frameID);
frame.setAttribute('src', url);
frame.style.display = 'block';
}
See the example here:
http://jsfiddle.net/ZNGmy/
Rather than having the pop-up as a hidden container that is made visible by the button, make the pop-up with the iframe content a separate html page that gets displayed by pressing the button. This way the content is not loaded until the button is pressed.
This link has an example of popping-up html pages.
http://allwebco-templates.com/support/S_add_pop.htm

How to call div content in widows.open()

Actually i have a asp:LinkButton in aspx page and i just want that whenever user clicks on asp:LinkButton open popup on dat asp:LinkButton its already done and i have given another link to it(its ur website's link only) and its working fine,
but the problem is now i want to open a popup with checkboxes with the cities name.
i have made one type of you can say block in a DIV on the same aspx page in the bottom and now i want is to call this div content in the script above in windows.open..
Please help me out ..
asap
Thank You!
You can't show only piece of the current page using the window.open function - only the whole page.
Use ModulPopup from the AjaxControlToolkit or Dialog from the jQuery-UI or some similar functionality.
Or you can create new page that will contain only div with cities names checkboxes and open it via the window.open function

Load swf file on click of (javascript)navigation label

I am trying to make a (heavy)swf file slideshow. for that i have created navigation labels at the bottom of the html page using javascript.And my my 'aim' is when i 'll click on any navigation label,particular swf file will be loaded. Here i'm getting problem is , when i open that html file all swf files are loaded at the same time. so when i click on nxt label part of swf only displays.
so what is the soln to this?
is there any way that when i'll click on navigation label only that time particular swf file will played and when i'll go to nxt label, previous label shoud have to unload.
I think that instead of pre-loading, you should load the SWF files dynamically, changing the src attribute of the element in the moment it is displayed.

Categories