Found this content helpful? Log in or sign up to leave a like!
Pass data to iframe page as non-admin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Overview of issue
On a Page, I'm trying to pass data that to an html file I'm loading via iframe. The main data I need right now is current user/course data, so passing data from the window.ENV object would be ideal.
Receiving data would be helpful, but I know that's a completely different set of issues.
Note: I am just an instructor, thus I do not have admin rights.
Sample code from Canvas Page
The pages I load are from a different course, which I use sort of like a repository for shared content. In the URL below, that's the MY_REPO_COURSE_ID.
What I've tried
So, so many things. Here are a few of my attempts...
Dynamically add query strings to the src URL
Use postMessage from the parent page
Query the API from within the iframe page
Use LTI postMessage from within the iframe page
What to do next
I'm pretty close, so I hope it's just that I'm missing something obvious. I.e., I just haven't come across the right page in the documentation.
Sorry to bother the board with something I figured I'd be able to solve, and I'd be grateful for any ideas or suggestions.