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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

is it possible to control button in prompt window

Status
Not open for further replies.

H2

Programmer
May 17, 2001
24
0
0
HK
Hi all,
I have a page with a prompt window, as I dont want to user to click the 'cancel' button to skip inputting data.
Is it possible to have the 'ok' button ONLY?
Also, can I control the width of the input box?

Thanks
H2
 
Hi H2,
The answer is no. You can't customise prompt dialog as it's the standard javascript function.

If you want to do it, I recommend you to create a "fake" dialog html window, with everything set up as you wish (input width and without Cancel button). Then you'll have to pass the value entered to a parent window, search this forum for an answer how to do it.

But I'm sure that you won't be able to avoid visitor skipping the form. Even if it will not have any Cancel button, anyone can close it using common [x] button at the upper right corner that is on any window.

good luck
 
hi starway,
yes, you are right, thanks for your opinion ^^
 
FYI, you can do some fancy prompting customization using VBScript on the client side. Of course, this is only good on IE browsers but if you have script control on the server, you could detect the browser then serve up VBScript for IE users and JavaScript for NS users.

Chances are, you'll get 90% IE users so you may be able to accomplish what you want.

Visit the Knowledge Base at for more details.

ToddWW
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top