Comments (6)
I've just added this to the example for you.
from iframe-resizer.
In index.html (the parent page), could you tell me what "$('p#callback').html(" is? The chrome debugger didn't seem to know.
Can it be replaced with a static string of some sort?
Are all forms of this code unworkable without jquery?
from iframe-resizer.
It's a bit of jQuery, ignore it and just look at the alert box on the next line.
from iframe-resizer.
Thanks;
I just needed to delete that block of code to see that all it did was add extra information text on the main page below the iframe. Haven't tested the code in a page of my own yet, but after making a few dozen stupid mistakes I should be good to go.
from iframe-resizer.
Test successful:
In iframe page I added a button:
text to red
In parent page I added this code:
<script type="text/javascript"> function ChangeMyParentPage(newColor) { document.getElementById("branch_div").style.color=newColor; alert("In ChangeMyParentPage with: " + newColor); return; } iFrameResize({ log : true, // Enable console logging enablePublicMethods : true, // Enable methods within iframe hosted page messageCallback : function(messageData){ ChangeMyParentPage(messageData.message); } }); </script>And I had a red letter day in my id=branch_div !!!
Thanks;
from iframe-resizer.
You should look at jQuery, it will make your life much easier. Very simple to learn it's just
$('CSS selector').doSomething().doSomethingElse();
from iframe-resizer.
Related Issues (20)
- i am having button inside iframe . how can i detect button click event HOT 1
- Scroll to element on AJAX request not working in child page even with scrolling set to yes HOT 1
- BREAKING🐞: `v4.3.9` release breaks usage of `.min.js` file from CDN HOT 5
- Scrolling may make the page jump to the left HOT 4
- [Feature Request] Add onResizeError callback HOT 4
- Value for minHeight can not be greater than maxHeight HOT 1
- Extra padding in Safari (macOS) 17.3 HOT 11
- Rounding up calculated height value to non-decimal number to prevent scrollbar from showing HOT 33
- Callback from IframeResizer does not get the latest state object HOT 2
- iFrame with dynamic blog posts nested in toggles not resizing in mobile phones. HOT 10
- Svelte HOT 3
- How to handle media queries? HOT 1
- Future roadmap
- Attempting to import latest parent script via CDN results in a 400 error HOT 4
- Vue Feedback
- License changed from MIT to GPL HOT 1
- Incorrect license in 4.4.x package.json HOT 4
- Some times page show as blank on IOS device (iPhone Safari Browser) if forum is embedded and scroll up and down and then stop. HOT 2
- Vue version, TypeError: Cannot destructure property 'title' of 'document.getElementById(...)' as it is null. HOT 4
- 5.1.2 bug - index.umd.js:20 Uncaught TypeError: Invalid value used in weak set HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iframe-resizer.