Skip to main content
WolfShade
Legend
November 18, 2010
Question

Recordset and the iFrame

  • November 18, 2010
  • 2 replies
  • 527 views

Hello, all.

I'm creating a page that uses an iFrame (starts out hidden) to display a form for filtering the results of a query.

Because the document contained within the iFrame is loaded separately, it doesn't see the query results of the main window.  (I need this in order to populate a few SELECT objects.)

If there is a way to do this without going to JSON or SOAP, that would be preferred.  Is there a way to insert the recordset into a global variable that the document inside the iFrame can access?  (This is a clustered environment - session variables are turned off.)

Thanks,

^_^

    This topic has been closed for replies.

    2 replies

    ilssac
    Inspiring
    November 18, 2010

    You should be able to convert the record set to anything you want and provide that to JavaScript.  I've done this in the past with the older WDDX technology.

    But boy, might that make a page heavy.

    WolfShade
    WolfShadeAuthor
    Legend
    November 18, 2010

    If XML is the only way to do it, then I'll go that route (can't use WDDX, that's been disabled, too.)  I just thought there might be a way to save the struct (or at least part of it?) into a client variable (they are saving client variables to database) and parse that inside the iFrame.

    Can that be done?

    ^_^

    ilssac
    Inspiring
    November 19, 2010

    WolfShade wrote:

    If XML is the only way to do it, then I'll go that route (can't use WDDX, that's been disabled, too.)

    You've disabled WDDX, which would create XML of a complex variable in one line of code, but the will let you create the XML by hand?

    WolfShade wrote:

    I just thought there might be a way to save the struct (or at least part of it?) into a client variable (they are saving client variables to database) and parse that inside the iFrame.

    Can that be done?

    Well, client variables do not allow for complex variables, that is one of their major limitations.  So to put a complex variable into a client variable it would have to be converted (i.e. encoded) into a string representation.  Such as XML, WDDX, JSON, etc.  Then yes that could be read from the client store by the iFrame request.  It could also be written to a text file, set into a cookie, or any other way you can imagine to pass a largish chunk of text from one request to another request.

    It might help, if we make sure that you understand that a iFrame is just another request, no different the a user submitting a form or clicking on a link.  So how ever you are maintaining state data in your application with all of these severe sever limitations can be used within the iFrame code.

    Inspiring
    November 18, 2010

    Without using session variables, I suggest converting your recordset to xml and passing this as a url variable in your iframe tag.