Hidden Frame Help

Results 1 to 2 of 2

Thread: Hidden Frame Help

  1. #1
    Join Date
    Dec 1969

    Default Hidden Frame Help

    Could someone point me to a relatively easy to understand reference on using hidden frames to capture data? I think they might be suitable for my application, but don&#039;t know enough about them. I checked the FAQs but nada.. <BR><BR>My site uses 5 frames, some of which update simultaneously depending on what the user is doing. The problem is that I&#039;m finding I have a lot of duplicate code in different frames and I&#039;m trying to be efficient.

  2. #2
    Join Date
    Dec 1969

    Default Never seen any reference on it...

    I&#039;m one of the people who "invented" the idea. I say "one of" because many many of us came up with the same idea.<BR><BR>I&#039;m not sure what you are trying to do, so it&#039;s hard to give a generic answer. But let&#039;s take a stab.<BR><BR>If you need access to the same recordsets from multiple frames, then maybe you could just convert the RS into a JS array of objects.<BR><BR>Try taking a look at this demo of mine:<BR>http://www.clearviewdesign.com/Newbie/Demos/SortTableDemo.html<BR><BR>And look at the source code for the hidden frame.<BR><BR>I do this to create the array of JS objects:<BR><BR>**********<BR>// Constructor for an Employee object...<BR>//<BR>function Employee( nm, dpt, sdate, sal )<BR>{<BR> this.EmployeeName = nm;<BR> this.Department = dpt;<BR> this.StartDate = sdate;<BR> this.Salary = sal;<BR> // alert("Constructing Employee:
    " + nm + "
    " + dpt + "
    " + sdate + "
    " + sal);<BR>}<BR><BR>// Use ASP to create an array of Employees<BR>//<BR>var allEmps = new Array( <BR>&#060;% <BR>conj = " "<BR>conj2 = "," & vbNewLine & " "<BR>Do Until RS.EOF<BR> Response.Write conj & "new Employee(" _<BR> & "&#039;" & RS("EmployeeName") & "&#039;," _<BR> & "&#039;" & RS("Department") & "&#039;," _<BR> & jsDate(RS("StartingDate")) & "," _<BR> & RS("Salary") _<BR> & ")"<BR> conj = conj2<BR> RS.MoveNext<BR>Loop<BR>**************<BR><BR>That& #039;s okay, but kind of stupid. (I&#039;ve gotten smarter in the 3+ years since I wrote that.)<BR><BR>You&#039;d be better off using ADODB.RecordSet.GetString() to create the array, instead of using a DO loop.<BR><BR>You&#039;d put *all* arguments to the constructor inside &#039;...&#039; (or inside "...") and then use the constructor to convert the string to a date or real number or whatever.<BR><BR>*********<BR><BR>Anyway, once you have it as an array, you can easily sort it, filter it, or whatever you need in order to produce the data needed by the other frames.<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts