View Full Version : POPUP? How can I?
Ok I have a home page I made, and its completly done. Well except for one thing..
:eek: I want a POPUP to come up and display a Ad, and/or Some kind of site etc..
Could someone please help me?
Show me what i have to do, or provide me with a piece of code. :D
Thanks in advance.
-TJ
blackpepper
08-31-2006, 12:05 AM
mod this code alittle
http://www.htmlforums.com/showthread.php?t=81739
instead of putting a link, get rid of the link an make your body tag look like this
<body onLoad="thefunction()">
.....
</body>
Ok Im not sure but, when I put
<body onLoad="thefunction()">
blabla
</body>
Where would i put the link for the popup? do i leave ["thefunction()">] how it is? Sorry im new to some of this stuff.
blackpepper
08-31-2006, 12:52 AM
its hardcoded into the javascript i posted. <head>
<script type="text/javascript">
function popup() {
window.open('http://YOURPAGE.php,'popup','width=#,height=#');
}
</script>
do you need more help changing it to onload?
yes please, haha so sorry about this. I tried doing it myself tho lol.
Heres a few diffrent ways I tried.
<html>
<body onLoad="function popup()">
<script type="text/javascript">
function popup() {
window.open('http://www.halomodding.2hell.com/,'popup','width=500,height=500');
}
</script>
</body></html>
<html>
<body onLoad="function popup() window.open('http://www.halomodding.2hell.com/,'popup','width=500,height=500');">
</body></html>
lol i feel so dumb
blackpepper
08-31-2006, 01:19 AM
lol its fine. try this,, hopefully itl work out.
add this in between your <head> tags
<script type="text/javascript">
function popup() {
window.open('http://www.halomodding.2hell.com/,'popup','width=500,height=500');
}
</script>
and then your body should look like this
<body onLoad="popup()">
...
</body>
work?
blackpepper
08-31-2006, 01:20 AM
nice looking site btw, if only you werent using tables:D
ok so like this?
<html><head>
<script type="text/javascript">
function popup() {
window.open('http://www.halomodding.2hell.com/,'popup','width=500,height=500');
}
</script>
</head>
<body onLoad="popup()">
...
</body></html>
Oh and what do you mean if i werent only using tables lol?? you talking about flash or somthing?? cuz if your talkin about flash i would be willing to learn it. :)
oh and thanks for the comment about my site. i did most of the artwork and html. my buddy helped a little i got to give him some credit.
blackpepper
08-31-2006, 01:38 AM
ok so like this?
<html><head>
<script type="text/javascript">
function popup() {
window.open('http://www.halomodding.2hell.com/,'popup','width=500,height=500');
}
</script>
</head>
<body onLoad="popup()">
...
</body></html>
Oh and what do you mean if i werent only using tables lol?? you talking about flash or somthing?? cuz if your talkin about flash i would be willing to learn it. :)
oh and thanks for the comment about my site. i did most of the artwork and html. my buddy helped a little i got to give him some credit.
yea that does look right, lemme know how it works.. also, the tables comment.:P
you used tables for your layout on your site, id recommend switching over to css and divs... but hey, u didnt ask for a review. good lu ck
hmmm, at the bottom where the progress bar would be, it says "error on page". If i saved my file on my comp in html form would that effect the popup?
PS: ur gettin alot of posts out of me lol
oh and I dont mean to double post but, I think im going to go to bed for now. its 1:48 a.m. So yea thanks for your help, Ill be on later after I get some sleep. haha
and i left you a reputation ;)
Camac
09-07-2006, 08:55 AM
in this code
window.open('http://www.halomodding.2hell.com/,'popup','width=500,height=500');
you are missing an '
it should look like this
window.open('http://www.halomodding.2hell.com/','popup','width=500,height=500');
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.