View Full Version : [+6REP] Popup code?
shizzle
12-09-2009, 03:15 PM
Umm just the code for a pop-up as soon as you go on a site, and you have to click, Ok, Cancel or 'X' ;) and you can customize the message...
This is all javascript no HTML ones right? ...
thx..
<scriptlanguage="JavaScript">
function loadalert ()
{alert("Message")
}
</script>
<bodyonLoad="loadalert()">
Put this in the body of your site.
shizzle
12-09-2009, 03:40 PM
wait, this site has like enter HTML but it wouldn't work right?
Dromenail
12-09-2009, 03:40 PM
or just
<script type="text/javascript">
document.onload.alert('message');
</script>
EDIT:
What exactly do you need it to do?
shizzle
13-09-2009, 08:39 AM
Popup when you go on a site, and redirect if click ok, or cancel. This supports HTML, so I don't think it'll work..
Try it. That code is a javascript popup.
Dromenail
13-09-2009, 12:37 PM
Agred with above. The above code is a javascript popup.
shizzle
13-09-2009, 01:09 PM
Well I did ask, the site has a HTML box and a normal no HTML box only (HTML disabled), so I don't think it will work right?.... I did try it.
Dromenail
13-09-2009, 02:17 PM
I will upload that code to a file on my website to prove it works.
shizzle
13-09-2009, 02:19 PM
Ok.... But I asked something, so answer it.. :l
Dromenail
13-09-2009, 02:22 PM
http://www.callumcarolan.co.uk/thbb/news/alert.htm
code:
<script type="text/javascript">
alert('hello');
</script>
shizzle
13-09-2009, 03:55 PM
This new one works :)! Thanks, is there one where you have to click OK or CANCEL.. ok redirects to one site, and cancel redirects to another +REP!
<script type="text/javascript">
function changepage( page ) {
var confirm = confirm("Change the page to: " + page + " ?");
if (confirm){
window.location = page;
} else {
return false;
}
}
</script>
<a href="page.html" onclick="changepage('page.html');">Change Page to page.html?</a>
I haven't tested it.
shizzle
14-09-2009, 10:59 AM
<script type="text/javascript">
function changepage( page ) {
var confirm = confirm("Change the page to: " + page + " ?");
if (confirm){
window.location = page;
} else {
return false;
}
}
</script>
<a href="page.html" onclick="changepage('page.html');">Change Page to page.html?</a>
I haven't tested it.
Looks confusing.
<script type="text/javascript">
alert('hello');
</script>
Can anyone make it so you wait a bit ('x') and then I can put how long you wait till that pop-up pops up.
syko2006
14-09-2009, 11:06 AM
Nice site you've got going on there Callum. :)
Dromenail
14-09-2009, 03:07 PM
Nice site you've got going on there Callum. :)
Thanks (:
shizzle
14-09-2009, 06:53 PM
Nice site you've got going on there Callum. :)
The best site ever.
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.