Forum Moderators: open
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?
Use a client side javascript routine to hook the data input field and show a javascript "prompt" (similar to "alert") to grab the data. You will find that javascript will lock the browser until it is finished. In other words, javascript itself has modal behaviour when a prompt or alert is active.
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.