homepage Welcome to WebmasterWorld Guest from 23.20.61.85
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
Forum Library, Charter, Moderators: ocean10000

Microsoft IIS Web Server and ASP.NET Forum

    
Getting user input via a Modal Window
Any alternatives to showModalDialog which is not cross browser compatible
fabfurs

10+ Year Member



 
Msg#: 2595 posted 1:14 pm on Mar 23, 2005 (gmt 0)

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

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 2595 posted 5:14 am on Apr 13, 2005 (gmt 0)

*bump*

plumsauce

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 2595 posted 4:42 am on Apr 16, 2005 (gmt 0)


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.

fabfurs

10+ Year Member



 
Msg#: 2595 posted 1:05 pm on Apr 19, 2005 (gmt 0)

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.

aspdaddy

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 2595 posted 11:38 am on Apr 28, 2005 (gmt 0)

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved