- Forums
- Javascipt
- Cool Javascript Tricks - Make A Popup Alert Window Appear With Javascript
This Page Contains information about Cool Javascript Tricks - Make A Popup Alert Window Appear With Javascript By wallpaperama in category Javascipt with 15 Replies. [787], Last Updated: Sat May 18, 2024
wallpaperama
Sun Jan 07, 2007
15 Comments
9536 Visits
did you see that popup?
with javascript you can make some pretty cool tricks to you visitors. one way to get your visitor's attention is by making a popup or alert window appear on the user's computer. Most often these popup windows are used to prompt the user, in most cases to tell the user there was some error. a common place to use alert popups is on web forms.
so to make this easier to learn for you, i will make an an example code page so you can see it in action. the first thing to do is to open a text editor, then copy and paste the following code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>making a javascript alert popup windows</title>
</head>
<body>
<br />
<script language="JavaScript"><!--
alert('Hello Friend, Find Hosting At Webune.com \n Click OK To Continue');
//--></script>
<p align="center"> </p>
<div align="center">
Copyright © 2007 Wallpaperama - All Rights Reserved<br />
Hosting Provided by <a href="http://www.webune.com">Webune.com</a>
</div>
</body>
</html>
Now paste the code into your notepad and save the file as javascript-alert.html and upload to your website. once you have uploaded to your website, open it and see it in action.
If you don't have a website, our friends at www.webune.com can provide you with a website. They have provided us with web space to show you how this script work so you can see it in action:
CLICK HERE TO SEE JAVASCRIPT DEMOIf you need web hosting for your site, remember to visit www.webune.com for all your web and domain hosting needs.