How to create a pop-up box in HTML.

I want to add a button which launches an error message pop-up box. (It's sort of a joke -- there would not be an actual error.)  How would I do this? Thanks!
MetajagAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

xabiCommented:
You can do two things:

1st.-

Use a alert box.

<input type="button" Value="Click me" onclick="alert('Hands UP!')">

2.-

Open a Window without the toolbars, etc

<input type="button" Value="Click me" onclick="window.open('file.htm','_blank','menu=no,scrollbars=yes');

where "file.htm" must be a html file with the html you want inside you window.

Hope it helps

xabi
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
xabiCommented:
Sorry it was a mistake in the second option, sorry:

<input type="button" Value="Click me" onclick="window.open('file.htm','_blank','menu=no,scrollbars=yes')">

That's the right way

xabi

0
oubelkasCommented:
>> onclick="alert('Hands UP!')">

Haha Xabi, no podría usted encontrar cualquier cosa mejor?

Just kidding.... ;)

MetaJag> what Xabi explained to you can be your solution, another way (with more code) is to implement you own box with your own image in it. But see what you think of Xabi's solution.

Joseph
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

xabiCommented:
Joseph:

hahahah he needs it for a joke, so...

Sounds good,don't you think so?

xabi
0
oubelkasCommented:
Si, Xabi, agradable ;)

Joseph
0
MetajagAuthor Commented:
Gracias! Es muy agradable! I'll try the suggestions.  
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.