Can an iframe install a cookie or session on the parent page? How do i get value in an iframe to the parent page without using Ajax? I am trying to pass an Id value from the iframe to the parent page and then submit it.
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
From within your iframe, you can reference the parent document using
parent.document
. If you had an input field in your parent window and wanted to set a value on it without using AJAX, you should simply be able to do the following using JavaScript:You can call functions in your parent page as well:
I'm not sure about manipulating a parent's cookie(s) from a child frame, but your post it seems like all you need to do is store and submit a value. You won't be able to do it with just PHP.