Hi !
I'm working at a product database using mysql/php/javascript. There are "linked" products, so when I open up a product page, there might be a list of linked products - say, it is a product group. When you click on such a linked product, a new product page will be opened in a new window. From there you will see the list with all products in that group again. I gave every product window an unique name (like product_nn_xyz, while nn is the group ID and xyz is the database ID of the product). The problem is, there are parameters which influence other products in that group. So whenever such a parameter is changed, I need to reload all product windows of that group.
My problem is to keep track of open windows. I can't store an handle-array, because my windows do *NOT* get opened from "the one" parent window. (Sorry, I edited that sentece, I forgot the important NOT word). A global "inter-window" variable space would be nice, but I'm not sure, if JavaScript can do so.
Easiest would be to find the windows by their unique name, but I did not find any JavaScript function giving me a handle by name. And open() does not help either. I tried the trick with opening a window without URL. I identified my already opened window by a variable which I set in all windows. If that variable was found, I called handle.location.reload(), and if not I called handle.close(). Indeed this works, but it looks pretty awful if there are 20 products within the group, when I iterated through all possible products. Windows popped up an closed immediately, not to say it needs an amount of time to start an IExplorer 20 times.
So, does anyone have a neat idea of how to keep track of my window handles ? Or how to simply reload ALL open windows ?
Regards,
-C
I'm working at a product database using mysql/php/javascript. There are "linked" products, so when I open up a product page, there might be a list of linked products - say, it is a product group. When you click on such a linked product, a new product page will be opened in a new window. From there you will see the list with all products in that group again. I gave every product window an unique name (like product_nn_xyz, while nn is the group ID and xyz is the database ID of the product). The problem is, there are parameters which influence other products in that group. So whenever such a parameter is changed, I need to reload all product windows of that group.
My problem is to keep track of open windows. I can't store an handle-array, because my windows do *NOT* get opened from "the one" parent window. (Sorry, I edited that sentece, I forgot the important NOT word). A global "inter-window" variable space would be nice, but I'm not sure, if JavaScript can do so.
Easiest would be to find the windows by their unique name, but I did not find any JavaScript function giving me a handle by name. And open() does not help either. I tried the trick with opening a window without URL. I identified my already opened window by a variable which I set in all windows. If that variable was found, I called handle.location.reload(), and if not I called handle.close(). Indeed this works, but it looks pretty awful if there are 20 products within the group, when I iterated through all possible products. Windows popped up an closed immediately, not to say it needs an amount of time to start an IExplorer 20 times.
So, does anyone have a neat idea of how to keep track of my window handles ? Or how to simply reload ALL open windows ?
Regards,
-C