Frames and framesets are not recommended but I maintain that for some tasks they are simply the best solution. You can avoid framesets and use iframes instead.
Another alternative is to use DIV tags to hold your content and lay it out side by side with fixed widths or float, and then load the content on the changing part via AJAX. You can also look into the jQuery Layout plug-in which provides sizable layout features with plain div tags.
The real issue however is not the layout usually - it's how the content gets loaded. Typically when frames are considered the idea is that you browse content in a list and display the relative content on the left. Regardless of what you do, that logic has to be managed somehow. The only two efficient ways to do this is either using a frame/iframe to load the content, or using AJAX to load data and update the content. The first option is almost always easier because you can effectively create a standalone page while the latter requires additional logic to deal with the content management all in the context of a single page that handles both the list and the data displayed.
Personally, I think while divs + ajax avoid frames and framesets - depending on the situation - it often only makes things more difficult to design and manage, especially if data input is required on the right.
I saw a posting from Luca in April 2012 regarding using Framesets; looks like Luca was able to set up an appropriate methodology to work with frames and framesets; looks pretty clear.
Does anyone have any good examples illustrating how WC5 has been combined in a successful and elegant way? I had tried to set up a traditional WC web form where I set up my own DIV tags to split the page with a wwWebDataGrid to illustrate results on the right side of the page, driven by a panel of different analytical conditions on the left.
Problem is each analytical method requires a different grid matrix design on the right hand side; I tried to manipulate the matrix programatically but it did not seem to hold; removing and adding columns seemed to lose the reference and the like, so, I thought that using framesets would be better.
I understand that using Frames and Framesets have been taboo; does anyone have any other recomendations? I've been messing with toggling the grid visible or not, but I can't seem to alter to grid characteristics on the fly. The Grid's load properly and the right data is always presented, however, can't modify the nature of the table...
For example, I have tried to modify the grid headers on the fly, depending on the new data cursor, but, whatever modifications I have tried tend to fail; does anyone see what I am doing wrong here in terms of altering Grid Characteristics on the fly; I figure that you should be able to modify this without to much difficulty but my grid references appear to be pooched...
Some Code below;
Define Class DefaultHome_Page As WWC_WEBPAGE Of WWC_WEBPAGE_FILE
#If .F.
Local This As DefaultHome_Page_WCSX Of DefaultHome_Page.prg
#Endif
EnableSessionState = .T.
oUser = Null
nId = 0
nAccessLevel = 0
txtLabel = "Marketing Database"
ImageURL = "images/DefaultHome.jpg"
lc_FileToUse = ""
Function OnLoad()
This.Page.EnableSessionState = .T.
This.oUser = Createobject("ClientName_Dataclass")
this.txtBottomGreeting.text = this.txt1
this.ddl_clientsegments.change()
IF this.IsPostBack
else
SELECT * FROM addbs(Config.cDataPath)+"StoreID" INTO CURSOR GridData
endif
Endfunc
FUNCTION ddlClientSegments_change()
DO case
CASE VAL(this.ddl_clientsegments.SelectedValue) = 1
this.txtLabel="Segment Profiles"
this.wwParmDropDownList.unbinddata()
SELECT * FROM addbs(Config.cDataPath)+"SegmentProfiles\SegDesc.dbf" INTO CURSOR SegParms
USE IN SegDesc
this.wwParmDropDownList.DataSource = [SegParms]
this.wwParmDropDownList.FirstItemText = "* Select Segment *"
this.wwParmDropDownList.FirstItemValue = "0"
this.wwParmDropDownList.DataTextField = "Description"
this.wwParmDropDownList.DataValueField = "Segment"
this.wwParmDropDownList.databind()
this.lbl_parms.text="Segments"
CASE VAL(this.ddl_clientsegments.SelectedValue) = 2
this.txtLabel="Segment Profile Distributions"
ENDCASE
ENDFUNC
FUNCTION ParmDropDown_Change()
this.grdMainDataGrid.unbinddata()
lc_FileToUse = addbs(Config.cDataPath)+"SegmentProfiles\meansprofiles14_segmnt" + this.wwParmDropDownList.SelectedValue
SELECT *, RECNO() as seqno FROM &lc_FileToUse INTO CURSOR GridData
ENDFUNC
FUNCTION OnPreRender()
this.RenderGrid()
ENDFUNC
FUNCTION RenderGrid()
this.grdMainDataGrid.DataSource = [GridData]
SELECT GridData
loCol = this.grdMAINDATAGRID.COLUMNS.item("wwWebDataGridColumn_3")
IF FSIZE("Catogory") <> 0
loCol.HeaderText = "Description of Attributes"
ELSE
STORE FIELD(3) TO lc_fieldname
loCol.HeaderText = [lc_fieldname]
ENDIF
this.grdMainDataGrid.databind()
ENDFUNC
Enddefine
thx
Serge