cnek03
07-20-2007, 05:43 PM
1) Script Title: DHTML Modal window v1.01
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/dhtmlmodal.htm
3) Describe problem:
Im pretty new to web programming, but I am catching on quickly. I am using the modal window and am having problems refering to the parent window from within the child window.
Scenario: From main window have textbox with button that opens a modal window using iframe with a form to select something out of inventory from 4 select boxes, which returns the selected item as a string to the textbox on parent window which works fine. On this first child window is another button that opens a 2nd modal window that again has a form that is used to add a new item to inventory that has one select box and 3 text fields. The select box has the same items as one of the select boxes from the first modal window. On this form I can add a new option to the select box using ajax, fill in text to the 3 textboxes and sumbit the form, which adds the new item to the database and closes this modal (the second child) window. When I get back to the first modal window, the select box that has the same items as in the 2nd child modal window, does not have the new option if created unless I refresh this modal window.
I would not like to have to refresh this modal window, manually or from its child. What I would like to do is from its child reload this select box, but I can't get the syntax correctly something I am missing not sure where to look.
On the 2nd child form, the process: click the submit new item button, which validates the form and on success returns true which posts the form, which I have a php script that will load the new item in the database, if that is successful I close the modal window.
Any help would be greatly appreciated, hope it makes sense.
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/dhtmlmodal.htm
3) Describe problem:
Im pretty new to web programming, but I am catching on quickly. I am using the modal window and am having problems refering to the parent window from within the child window.
Scenario: From main window have textbox with button that opens a modal window using iframe with a form to select something out of inventory from 4 select boxes, which returns the selected item as a string to the textbox on parent window which works fine. On this first child window is another button that opens a 2nd modal window that again has a form that is used to add a new item to inventory that has one select box and 3 text fields. The select box has the same items as one of the select boxes from the first modal window. On this form I can add a new option to the select box using ajax, fill in text to the 3 textboxes and sumbit the form, which adds the new item to the database and closes this modal (the second child) window. When I get back to the first modal window, the select box that has the same items as in the 2nd child modal window, does not have the new option if created unless I refresh this modal window.
I would not like to have to refresh this modal window, manually or from its child. What I would like to do is from its child reload this select box, but I can't get the syntax correctly something I am missing not sure where to look.
On the 2nd child form, the process: click the submit new item button, which validates the form and on success returns true which posts the form, which I have a php script that will load the new item in the database, if that is successful I close the modal window.
Any help would be greatly appreciated, hope it makes sense.