Passing information between frames
| From: | B�rge Strand | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Passing information between frames | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-102473@lists.php.net to get a copy of this message | ||
I tried posting this to the news group yesterday, but it didn't show
up.
Anyway, I have two frames and need to pass information between them.
Frame A holds a.php, a presentation of items which the user can select
(enter the number, hit the "buy" button). Frame B holds b.php, a list
of selected items (shopping basket).
a.php uses POST to tell b.php what the user just selected. b.php then
appends the last selection to its list. (The information from the B
frame is later posted to an order system.)
What I would like is for the A frame to see this list aswell, so that
I could pass the whole list and the new item to b.php in the B frame,
let b.php concatenate the old list and the new item into the new list,
and then let a.php in the A frame become aware of the new list as
well. Then the whole thing could happen again the next time the "buy"
button is pressed.
I guess I could update the entire frameset, there encoding the list in
A's URL. But bandwidth may be pretty low and I don't want the user to
scroll back to where he/she was in the A frame before hitting the
"buy" button.
The reason for wanting this is that I won't need cookies or
server-side storage of the shopping basket.
Any tips are welcome, my experience with php can be counted in hours,
not days or weeks! But I've done a little perl cgi before.
Regards,
Børge