I have a form that the user is using to input data and sometimes they would need to reference a large db query and select an item that needs to be included on the underlying form.
The showModalDialog is the perfect tool as it takes over the input focus and only returns it to the calling form when closed, the user must complete this request before proceeding. It also can return a value which the underlying form is expecting. The problem is the showModalDialog is purely IE compatible.
It doesn't make any performance sense to preload the main form with all the possible data so that the user can select it if he requires the data (maybe 50% of the time).
Is my only option to temporarely store the main form's data when the user selects the query db option then repopulate the form with the user's data and the lookup data?
Xoc: I finally gave up looking for a modal solution that would make the roundtrip to the server for the lookup data and now store this data regardless on the form in case the need arises. Not very efficient :(
I store the data as jscript arrays and populate dropdown boxes based on the users choices.
response.write( "array1 = [" ) notfirst = 0 do while Not rs.eof if notfirst = 1 then Response.Write "," end if notfirst = 1 response.write( rs("field1") & ", " & rs("field2") ) rs.MoveNext loop response.write( "];" & vbCrLf )
Of course the arrays are dynamically named so that the underlying jscript code knows how to reference them.