I have a shopping cart CGI program that I have customized to fit my needs. In the store, when you click on the order image it orders the product (of course) except when there are other options (i.e. different sizes, colors, etc.) for the product. The options are shown via pop-up window. In this pop up window, there are more order images for each product option. Upon clicking one of these images, the pop-up window disappears and the main window proceeds to the shopping cart.
My dilemma is this: There is a referer in the CGI to allow the shopper to continue shopping from the page they came from. When an item is ordered from a pop-up window, the referer is the pop-up window rather than the main page. Therefore, when the shopper "continues shopping", the referer places the pop-up window's contents in the main browser window rather than the main shoping page's contents.
Is there a way to program the CGI script to send them to another specific page if they have come from a certain page(rather than just a plain referer)?
If the above will not work, is there possibly something else that I could do to solve this problem?
We do not want to get rid of the pop-up windows as they are vital to the "feel" of the site.
I hope I have explained my problem so as not to confuse anyone too terribly! <g> Thanks so much in advance for your time.