Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

window.prompt

Status
Not open for further replies.

Pinpoint

Programmer
Dec 23, 2001
49
GB
Hi,

I am using window.prompt, to prompt the user for info. Is it possible to control where on the screen the prompt box appears ? By default it is top-left - not ideal.

Can I also control the size of the prompt dialog box ? By default it is far wider than it needs to be.

Can I also get rid of the 'Script prompt' text which displays before any text I put into the dialog ?

If I can't control these parameters, what is the quickest alternative way of invoking a small dialog box ?

Thanks,

Pinpoint.
 
no, no, and no.

alternatively you can open() a new window, but this will not be modal.

IE has the showModalDialog() method for creating modal dialogs (and also a showModelessDialog() method)

Mozilla also has a modal dialog method that i don't know off the top of my head.



=========================================================
-jeff
try { succeed(); } catch(E) { tryAgain(); }
 
Thanks,

showModalDialog() seems to do the trick. Is it possible to control the size and position of the dialog, like with window.open ? (Have tried to copy the parms but they do not work).

Do you know of an online source for IE user-support for this level of programming detail ?
 
Yes, thanks. I also found a useful how-to on the IE Knowledgebase, which is a first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top