Ugh! I am very agrivated right now because I keep trying to prgm extremely simple HTML scritps and NONE of them are working, thats including JS. I am going to learn PHP but I dont want to wait to test this out before I learn PHP, it will be too long and I will forget about it. Please post a correct and tested script that opens a popup window. Or tell me what I did wrong in this once:


Code:
<script language="JavaScript">
window.onload('index_inwindow.html','Forum OS | Swivelgames Ltd.','toolbar=0,location=0,directories=0,status=1,menubar=0,resizable=1,copyhistory=0,scrollbars=0,width=750,height=500');
</script>


or


Code:
<script language="JavaScript">
onload="window.open('index_inwindow.html','Forum OS | Swivelgames Ltd.','toolbar=0,location=0,directories=0,status=1,menubar=0,resizable=1,copyhistory=0,scrollbars=0,width=750,height=500')";
</script>


Thanks, please help.
you know, for php, you have to have a good knowledge of HTML
html =/= javascript Rolling Eyes

HTML doesn't even HAVE scripts, it has script TAGS, but cannot do a script in and of itself.

The "onload" popups will be blocked by any pop up blocker, are extremely annoying, useless, and should be avoided at all costs <- the first one is prolly why it isn't working for you (ie, disable the popup blocker)

PHP is a server-side scripting language, not client side, meaning it can't make a popup either, only print out the code to make the popup.

So I'd change the title of this thread to "HELP MAKE MY SITE CRAPPY BY ENABLING POPUPS!" Laughing
Neutral I am not laughing, its really annoying me right now, its not even coming up, there is no popup to block is the problem.
CAPS =/= cool. Very Happy Just Joking
So anyway, are you putting those in the head or body section?
I am putting those in the head of the HTML document and then I put the onload="javascript."FUNCTION_NAME"('index_inwindow.html') inside the first body tag <body onload="javascript."FUNCTION_NAME"('index_inwindow.html')>

Is that not correct?
Not at all correct.

Code:
<html>
<head>
<script language="javascript">
function launchMyPopup() {
window.open('index_inwindow.html','Forum OS | Swivelgames Ltd.','toolbar=0,location=0,directories=0,status=1,menubar=0,resizable=1,copyhistory=0,scrollbars=0,width=750,height=500');
}
</script>
<body onLoad="javascript:launchMyPopup();">
My Content Here
</body>
</html>
Ok thanks Kerm. Much apperciated, I will add that to my site now.
Does that work for you? I tested it and it worked for me...
swivelgames wrote:
Neutral I am not laughing, its really annoying me right now, its not even coming up, there is no popup to block is the problem.


you are missing the point then. Having popups is the WORST possible design decision you could ever make. Nearly all visitors will have a popup blocker, and won't see it anyway (but will get annoyed at the "this site tried to launch a popup warning")

GET RID OF IT ENTIRELY! DON'T TRY AND MAKE IT WORK!
Tip: make a virtual popup via a centered floating div.
Kllrnohj wrote:
you are missing the point then. Having popups is the WORST possible design decision you could ever make. Nearly all visitors will have a popup blocker, and won't see it anyway (but will get annoyed at the "this site tried to launch a popup warning")

GET RID OF IT ENTIRELY! DON'T TRY AND MAKE IT WORK!


Dude, all I am doing is trying to test something, and it involves a POPUP, so obviously your missing the point.

Thanks Kerm, I will do that. Smile
It's really easy, and just make an area that sets the div's visibility to none when clicked.
I have a mod that does that one private message notify for my phpBB board.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement