Link to home
Start Free TrialLog in
Avatar of daimo1
daimo1

asked on

Change window.open to showModalDialog?

Use a spelling app that opens using window.open, checks and help correct the spelling in a text box and then closes.  Want to be able to change how this opens, from a window.open link to a showModalDialog link.  Is this possible?

Current window.open code:

<textarea name="MyTextArea" cols="50" rows="7" id="MyTextArea">Ths iz a tezt sampl. </textarea>
<a title="Spell Check" href="#"  onClick="window.open('/ASPSpellCheck/ASPSpellCheck.asp?fields=MyTextArea','aspSpellWin','width=460, height=290, scrollbars=no');return false;" ><img src="/ASPSpellCheck/Assets/spellicon.gif" style="cursor:pointer"   alt="Spell Check" border="0" ></a>


Had a go at using showModalDialog, the window opens but hangs. Presume that there is an parameter that is not being passed:
<textarea name="MyTextArea" cols="50" rows="7" id="MyTextArea">Ths iz a tezt sampl. </textarea>
<a title="Spell Check" href="#"  onClick="window.showModalDialog('/ASPSpellCheck/ASPSpellCheck.asp?fields=MyTextArea','aspSpellWin','dialogWidth:460px;dialogHeight:290px');" ><img src="/ASPSpellCheck/Assets/spellicon.gif" style="cursor:pointer"   alt="Spell Check" border="0" ></a>

Anyone got any ideas?
Avatar of Kyanar
Kyanar

First question before I move forward on this: do you intend for people using browsers other than Internet Explorer to use your web page?  If so, then showModalDialog is not for you, as it is a feature implemented only by Microsoft browsers, and window.open is the function you should use.
Avatar of daimo1

ASKER

Hi Kyanar

Happy with IE only.  

D
ASKER CERTIFIED SOLUTION
Avatar of Kyanar
Kyanar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of daimo1

ASKER

Not what I wanted to hear but at least i won't waste anymore time trying.

Thanks for you help Kyanar.