...

View Full Version : How to make a pop up window?



Nblufire12
07-10-2008, 04:47 PM
hey guys

how do you make a pop up window that automatically spawns?
in html?

jcdevelopment
07-10-2008, 04:54 PM
well in html it would be like this


<a href="link.html" target="_blank">Link</a>
in Javascript it would be like this(more control)



<a href="#" onclick="window.open('win1.html','Window1',
'menubar=no,width=430,height=360,toolbar=no');">Link</a>

Nblufire12
07-10-2008, 05:11 PM
is this a pop up that pops up when u visit my homepage?

jcdevelopment
07-10-2008, 05:27 PM
<script>
var theURL = 'thePopupPage.html';
var width = 300;
var height = 400;

function popWindow() {
newWindow = window.open(theURL,'newWindow','toolbar=no,menubar=no,resizable=no,scrollbars=no,status=no,location= no,width='+width+',height='+height);
}
</script>




HTML



<body onload="popWindow()">


let me know if that what u want!

Nblufire12
07-10-2008, 05:31 PM
aww yes thanks a bunch

abduraooft
07-10-2008, 05:32 PM
Just keep in mind that automatic popups would annoy users and a popup blocker can easily remove them.

jcdevelopment
07-10-2008, 05:39 PM
Just keep in mind that automatic popups would annoy users and a popup blocker can easily remove them.


Words of wisdom!

You might want to look into an alternative, but i dont know your situation as far as why it pops up.

Nblufire12
07-10-2008, 05:48 PM
i just want a pop up message with updates

and i can put new updates in there

and a google Ad

Nblufire12
07-10-2008, 06:55 PM
would that work?
can you put HTML in a pop up

jcdevelopment
07-10-2008, 07:00 PM
yes of course. Thats what a pop-up is. Its an html file.

Nblufire12
07-10-2008, 07:09 PM
<script>
var theURL = 'thePopupPage.html';
var width = 300;
var height = 400;

function popWindow() {
newWindow = window.open(theURL,'newWindow','toolbar=no,menubar=no,resizable=no,scrollbars=no,status=no,location= no,width='+width+',height='+height);
}
</script>




HTML



<body onload="popWindow()">


let me know if that what u want!

the first one <script> didnt work
nothing showed up on my browser

imobilliare
07-10-2008, 07:54 PM
You would create a pop-up window manually by using Javascript, Java, and Ajax, along with XHTML to design the ad. There are also software programs you can use to quickly design a pop-up and it automatically generates code.

jcdevelopment
07-10-2008, 08:06 PM
<script>
var theURL = 'thePopupPage.html';var width = 300;
var height = 400;

function popWindow() {
newWindow = window.open(theURL,'newWindow','toolbar=no,menubar=no,resizable=no,scrollbars=no,status=no,location= no,width='+width+',height='+height);
}
</script>


on the highlighted area, did you name it your own url? Or did nothing show up at all?

Nblufire12
07-10-2008, 08:54 PM
nothing showed up at all
no pop up window

jcdevelopment
07-10-2008, 09:03 PM
show me your cod, exactly as you have it.

or use this to generate it.. not sure why it wouldnt work http://javascript.internet.com/generators/popup-window.html



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum