Welcome to WebmasterWorld Guest from 54.162.240.235

Forum Moderators: ocean10000

Message Too Old, No Replies

Getting user input via a Modal Window

Any alternatives to showModalDialog which is not cross browser compatible

     
1:14 pm on Mar 23, 2005 (gmt 0)

10+ Year Member



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

5:14 am on Apr 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



*bump*
4:42 am on Apr 16, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




Since XOC is bumping :)

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.

1:05 pm on Apr 19, 2005 (gmt 0)

10+ Year Member



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.

11:38 am on Apr 28, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



fabfurs,
could you post an example of the showmodal solution for IE, that passes back a value from the dropdown list to a text box.

This is a very common problem, one way is to redesign the process and use a search that give a shortened list on the next page- like the routeplanner apps.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month