PDA

View Full Version : Creating an error message upon entering page.



William93
16-03-2009, 07:51 PM
Hi, I have a little button on my website which says "bored?" where once clicked by somebody, they are taken to another page which as they enter, they get an error message containing whatever I put. Once they click OK, another one comes up. Similar to those on those Rick Astley sites.

So my question is, how can I do this? I'm sure I've done it before, but cannot remember how. Thank you.

Excellent2
16-03-2009, 08:06 PM
Button page:

<html>
<head>
<title>Stupid popups</title>
</head>

<body>

<form method="post" action="stupidpopups.html">
<input type="submit" value="Go">
</form>

<body>
</html>
Popup page:

<html>
<head>
<title>Stupid popups</title>
</head>

<body>

<script language="javascript">
alert('Popup 1');
</script>

<script language="javascript">
alert('Popup 2');
</script>

<script language="javascript">
alert('Popup 3');
</script>

</body>
</html>I think that will work but I haven't tested.

William93
16-03-2009, 08:31 PM
Thank you.

Trigs
16-03-2009, 10:57 PM
If you want something like www.pgmr.co.uk/owned.php (http://www.pgmr.co.uk/owned.php) (you'll need to close it via task manager, pressing x won't work) then use this:

http://www.habboxforum.com/showthread.php?p=5680827#post5680827

Protege
17-03-2009, 10:05 AM
Button page:

<html>
<head>
<title>Stupid popups</title>
</head>

<body>

<form method="post" action="stupidpopups.html">
<input type="submit" value="Go">
</form>

<body>
</html>Popup page:

<html>
<head>
<title>Stupid popups</title>
</head>

<body>

<script language="javascript">
alert('Popup 1');
</script>

<script language="javascript">
alert('Popup 2');
</script>

<script language="javascript">
alert('Popup 3');
</script>

</body>
</html>I think that will work but I haven't tested.

Why would you keep going <script language="javascript">?

Thats just pure stupidity. The script should be placed within the <head> element tags.


<html>
<head>
<script type="text/javascript">
function Bordem()
{
while( 1 == 1 )
{
alert( 'Boo hoo, ****.' );
}
}
</script>

</head>
<body>
<button onClick="Bordem();">Bored? Click here</button>
</body>
</html>

Dentafrice
17-03-2009, 11:20 AM
He's excellent coder m8, he kno whut he doin! u gotta put all those script tags duh! but i aint tested it

Protege
17-03-2009, 11:28 AM
I totalii agree enit

JAK06
22-03-2009, 01:28 AM
Could you not just use java script and try something like


function javascript_alert() {

var message = "CHANGE THIS";
alert (message);
}

Protege
22-03-2009, 06:35 AM
Once they click OK, another one comes up.

And why would you remake a function that already exists

alert( 'Message here' );

didn't need all the other stuff.

Want to hide these adverts? Register an account for free!