page1ink.
03-01-2006, 01:09 PM
this is apparently an odd question, as I've been googling for weeks and have yet to find a solution for it >.<
I'm trying to make a backend for a site as dynamic as possible by using iframes and POST data. right now, the way it's set up is 'salebox.php' has a form containing a listbox (<select> with multiple turned on). when the user clicks an item in the listbox, the IFrame below ('./includes/salebox_iframe.php') it updates with form fields for name, model, price, yadda yadda. this is done with a Javascript onClick event that passes the index of the clicked item to the PHP script in the IFrame, which then pulls the existing information from MySQL and displays it in a form. the user edits the values and clicks a submit button that is contained in that form inside the IFrame.
in a perfect world, I would be able to have that form (salebox_iframe.php) send its POST data back to the parent page (salebox.php), which would then update the data. this, however, is not a perfect world ;_;
so I suppose the simplest way to ask this question is 'how can I pass POST data from an IFrame to its parent?' perhaps I'm making it more complex than it needs to be. if I could get PHP and Javascript to dynamically interact I think that would be a good alternative.
let me know if I'm not making any sense hehe =)
I'm trying to make a backend for a site as dynamic as possible by using iframes and POST data. right now, the way it's set up is 'salebox.php' has a form containing a listbox (<select> with multiple turned on). when the user clicks an item in the listbox, the IFrame below ('./includes/salebox_iframe.php') it updates with form fields for name, model, price, yadda yadda. this is done with a Javascript onClick event that passes the index of the clicked item to the PHP script in the IFrame, which then pulls the existing information from MySQL and displays it in a form. the user edits the values and clicks a submit button that is contained in that form inside the IFrame.
in a perfect world, I would be able to have that form (salebox_iframe.php) send its POST data back to the parent page (salebox.php), which would then update the data. this, however, is not a perfect world ;_;
so I suppose the simplest way to ask this question is 'how can I pass POST data from an IFrame to its parent?' perhaps I'm making it more complex than it needs to be. if I could get PHP and Javascript to dynamically interact I think that would be a good alternative.
let me know if I'm not making any sense hehe =)