I'm working on a project that mimics a tabbed dialog. I started by trying to use the Microsoft.Web.UI.WebControls TabStrip but had with horrendous results - so I'm resorting to frames.
The form I'm trying to mimic is laid out like this:
[tt][ Tab1 ][ Tab2 ][/tt]
[tt]{miscellaneous controls}[/tt]
[tt][ Tab1a ][ Tab1b ][ Tab1c ][ Tab1d ][/tt]
[tt]{additional controls within tabbed pages}[/tt]
[tt]{submit & reset buttons}[/tt]
The easiest way to explain it is the top two tabs are for creating invoices and receipts with invoices the default selected tab. The misc. controls would change when you switch from tab1 to tab2. The next row of tabs gives access to either invoice details, taxes, totals or receipt details, taxes and totals (depending upon whether invoices or receipts are selected). Finally, although similar, the submit & reset buttons differ for invoices & receipts.
My plan was as follows:
-Create three frames (header, details and footer)
-header frame would contain top tabs, header controls and bottom tabs (there's actually 5 tabs for invoice details and 6 for receipt details).
-by default the details frame would contain items but (when you click on a lower tab in the header frame) a new page would load in place of it (taxes, totals...)
-footer frame would contain buttons that correspond to the header frame. If header contains invoices then footer contains invoice buttons.
The first problem is (I think) fairly trivial but I can't seem to get past it. I thought it would be similar to changing images on a mouseover/mouseout event but...
Assuming that Tab1a is in the foreground, when I click on Tab1c it should move to the foreground, Tab1a should move to the background and controls for Tab1c should appear below it. This requires replacing the images of Tab1a & Tab1c and loading a new page into the detail frame. I thought I had code to do the last bit (loading the new page) but it appears to be intermittent. And, I can't seem to change the images.
I've laid out all the individual pages (two headers, two footers and eleven detail pages). I'm running into problems in two areas:
1. Getting the correct page to load in the correct frame.
2. Communicating data between frames.
Specifically, when you click the Receipt tab, I'm executing javascript that (I think) should load the receipt header into the header frame, receipt footer into the footer frame and receipt items into the detail frame. It does the two latter but doesn't the former: The javascript looks like this:
[tt]function SwitchToReceipts()
{
parent.frames("header").document.location = "RcptHeader.aspx";
parent.frames("detail").document.location = "RcptDetail.aspx";
parent.frames("footer").document.location = "RcptFooter.aspx";
}[/tt]
Any idea why the second and third lines will load the correct page in the correct frame but the first won't?
The form I'm trying to mimic is laid out like this:
[tt][ Tab1 ][ Tab2 ][/tt]
[tt]{miscellaneous controls}[/tt]
[tt][ Tab1a ][ Tab1b ][ Tab1c ][ Tab1d ][/tt]
[tt]{additional controls within tabbed pages}[/tt]
[tt]{submit & reset buttons}[/tt]
The easiest way to explain it is the top two tabs are for creating invoices and receipts with invoices the default selected tab. The misc. controls would change when you switch from tab1 to tab2. The next row of tabs gives access to either invoice details, taxes, totals or receipt details, taxes and totals (depending upon whether invoices or receipts are selected). Finally, although similar, the submit & reset buttons differ for invoices & receipts.
My plan was as follows:
-Create three frames (header, details and footer)
-header frame would contain top tabs, header controls and bottom tabs (there's actually 5 tabs for invoice details and 6 for receipt details).
-by default the details frame would contain items but (when you click on a lower tab in the header frame) a new page would load in place of it (taxes, totals...)
-footer frame would contain buttons that correspond to the header frame. If header contains invoices then footer contains invoice buttons.
The first problem is (I think) fairly trivial but I can't seem to get past it. I thought it would be similar to changing images on a mouseover/mouseout event but...
Assuming that Tab1a is in the foreground, when I click on Tab1c it should move to the foreground, Tab1a should move to the background and controls for Tab1c should appear below it. This requires replacing the images of Tab1a & Tab1c and loading a new page into the detail frame. I thought I had code to do the last bit (loading the new page) but it appears to be intermittent. And, I can't seem to change the images.
I've laid out all the individual pages (two headers, two footers and eleven detail pages). I'm running into problems in two areas:
1. Getting the correct page to load in the correct frame.
2. Communicating data between frames.
Specifically, when you click the Receipt tab, I'm executing javascript that (I think) should load the receipt header into the header frame, receipt footer into the footer frame and receipt items into the detail frame. It does the two latter but doesn't the former: The javascript looks like this:
[tt]function SwitchToReceipts()
{
parent.frames("header").document.location = "RcptHeader.aspx";
parent.frames("detail").document.location = "RcptDetail.aspx";
parent.frames("footer").document.location = "RcptFooter.aspx";
}[/tt]
Any idea why the second and third lines will load the correct page in the correct frame but the first won't?