I have encountered an issue wherein a value received on a parent page from an IFRAME is not being POSTED. A FORM variable is set with the valude of the data received from postMessage. I can verify that the variable is being set using alert();
I have an working example of this scenario which can be found here:
When you click on Submit Query (inside the IFRAME), it will seem as if nothing happened, but what this does is submit the string "This is another one" to the parent. In the parent (which has the SUBMIT button) the value of a variable called js_var is set in a FORM with the data received by postMessage. That is, js_var is set to "This is another one". So, when you click the SUBMIT button, the variable js_var is POSTed to a file called post.html.
At the top of post.html I have the followig PHP code which shows what has been POSTed.
You'll see that the string "This is another one" has been assigned to js_var.
Array ( [js_var] => This is another one )
I am trying implement something similar for our website, but the value submitted by postMessage is not being POSTed.
when this page is displayed, you will see an alert(); which shows an empty array.
Now go to the CONFIGURE & QUOTE tab to see product options which are displayed in an IFRAME
For testing, choose:
from the SELECT a Material section
from the Options section
Click the Proceed to Quick Quote button
You will now see that the alert() displays an array containing the options you chose.
This alert is showig you the value of js_var, which is a hidden INPUT in the FORM surrounding the ADD TO QUOTE button on the parent (to the right of the IFRAME).
After clicking OK on the alert() you can click the ADD TO QUOTE button, just as in the example above, is supposed to POST js_var to a file called post.html. However, in this case, the POSTed array is empty!
Array ( )
I have tried setting the value used for for postMessage to just a string, in case there was something wonky with the array for the product option selection, but this did not work either. I still get an empty POSTed array.
Hope you can help!