Connecting Tech Pros Worldwide Forums | Help | Site Map

Javascript: modal dialog in FireFox

Newbie
 
Join Date: Jul 2006
Posts: 5
#1: Jul 21 '06
I'm trying to adjust the javascript code made for IE to Firefox (and other browsers).
I have a lot of functions that call the showmodaldialog in the middle of the code, wait for a returnvalue from the window called, and continue with the rest of the code. My problem is that if I call the window.open() method, the flow of the calling method continue to be processed, without waiting for the return value.
A loop cicle after the new window is opened is the only solution I've got without redesign the all application? Thanks in advance and sorry for my simple english.

Banfa's Avatar
AdministratorVoR
 
Join Date: Feb 2006
Location: South West UK
Posts: 6,190
#2: Jul 21 '06

re: Javascript: modal dialog in FireFox


Can you not use window.prompt() ? See

http://www.w3schools.com/htmldom/met_win_prompt.asp
Newbie
 
Join Date: Jul 2006
Posts: 5
#3: Jul 21 '06

re: Javascript: modal dialog in FireFox


Quote:

Originally Posted by Banfa

Can you not use window.prompt() ? See

http://www.w3schools.com/htmldom/met_win_prompt.asp


Really thank Banfa, I could do so, but I think that it's not really performat (visually talking).
An example (the simplest I have) could be the "change password" functionality. The user click on a menu link that runs a method. In this method a windows is called. This window contains only the old, new and confirm new text fields and a button to confirm. The return value of that windows is the old and new password. The remain code of the main method post the page to execute the ASP change password.
All the methods containing the ShowModalDialog behave in the same manner.
Before redesign the flow of all this method, I'd like to know if there is a elegant way to do the same things. Thanks
Banfa's Avatar
AdministratorVoR
 
Join Date: Feb 2006
Location: South West UK
Posts: 6,190
#4: Jul 21 '06

re: Javascript: modal dialog in FireFox


OK well in that case i do not think there is an elegant way of replacing this MS specific function I think you will have to redesign the flow of your pages.

Sorry
Newbie
 
Join Date: Jul 2006
Posts: 5
#5: Jul 21 '06

re: Javascript: modal dialog in FireFox


I was afraid that this is the only solution. Thank you very much for your kind support.
natmio
Newbie
 
Join Date: Jul 2006
Posts: 5
#6: Aug 21 '06

re: Javascript: modal dialog in FireFox


I post the message emailed to me by B4rT. I think this could be a good solution. (I've not tried this yet)

"Here is the solution for your problem:
http://www.hedgerwow.com/360/dhtml/...alog_window.htm
Unfortunatelly it desn't work for Firefox 2 (I don't know yet why)"

Thanks B4rT, I'll try it as soon as possible.
Reply