Go Back   Novahq.net Forum > Computers > Web design and Programming
FAQ Community Calendar Today's Posts Search

Web design and Programming Discuss website creation and other programming topics.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-15-2004, 09:03 AM
G.I.JOE*MFA* is offline G.I.JOE*MFA*
Registered User

Join Date: Feb 2002
Posts: 437

Send a message via ICQ to G.I.JOE*MFA* Send a message via Yahoo to G.I.JOE*MFA*
eek lil help here with window popups - FIXED!!!

i made a private policy and terms and conditions html pages

now i need them to open up in their own seperate windows 520 width and 600 height

no menu and all that crap at the top of IE

with scroll bar - it is needed...lol

i cant figure it out...i have a couple scripts ive used in the past that worked fine now either i cant figure out what i did then and apply it here or just brain dumped

a lil more info on my site HERE at the bottom

im posting here just in case mike dont hit the site 2day

terms is at http://dfmafia.net/terms.html (policy is linked in it as well)


thnx in advanced
__________________
DON'T LOOK AT MY SPELLING CAUSE IT SUCKS AND I DON'T CARE
__________________




*MaFiA*...Trust...Respect . . . Family

BF *MaFiA* - CoD *MaFiA* - DF *MaFiA* - JO *MaFiA* - RvS ¤MaFiA¤ - SW *MaFiA* - Capo Crimini
The Site




Last edited by G.I.JOE*MFA*; 08-15-2004 at 10:48 AM.
Reply With Quote
  #2  
Old 08-15-2004, 09:22 AM
Systemkaos is offline Systemkaos
Registered User

Join Date: Jul 2003
Posts: 1,736

Send a message via ICQ to Systemkaos
javascript, not sure the exact code for it but i know javascript is used for most popups
__________________
If any one wants a life i can email them in .rar and .zip format, although im out of sunlight
Reply With Quote
  #3  
Old 08-15-2004, 09:24 AM
Scott is offline Scott
Scott's Avatar
AKA. Panther

Join Date: Sep 2001
Location: Minneapolis, MN
Posts: 10,933

Code:
<script language="JavaScript">
function phPopUp(url,x,y) {
//Window Open Function Copyright 2004 phphq.net
day=new Date();
id=day.getTime();
eval("page" + id + " = window.open(url, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=" + x + ",height=" + y + "');");
}
</script>
You can change settings, like scrollbars=1 to show scroll bars. Etc.

<a href="phPopUp('_URL_','520','600');">Privacy Policy.</a>
__________________

04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq
Reply With Quote
  #4  
Old 08-15-2004, 09:34 AM
G.I.JOE*MFA* is offline G.I.JOE*MFA*
Registered User

Join Date: Feb 2002
Posts: 437

Send a message via ICQ to G.I.JOE*MFA* Send a message via Yahoo to G.I.JOE*MFA*
thnx checking it now
__________________
DON'T LOOK AT MY SPELLING CAUSE IT SUCKS AND I DON'T CARE
__________________




*MaFiA*...Trust...Respect . . . Family

BF *MaFiA* - CoD *MaFiA* - DF *MaFiA* - JO *MaFiA* - RvS ¤MaFiA¤ - SW *MaFiA* - Capo Crimini
The Site



Reply With Quote
  #5  
Old 08-15-2004, 09:39 AM
Systemkaos is offline Systemkaos
Registered User

Join Date: Jul 2003
Posts: 1,736

Send a message via ICQ to Systemkaos
thanx panther
__________________
If any one wants a life i can email them in .rar and .zip format, although im out of sunlight
Reply With Quote
  #6  
Old 08-15-2004, 09:47 AM
G.I.JOE*MFA* is offline G.I.JOE*MFA*
Registered User

Join Date: Feb 2002
Posts: 437

Send a message via ICQ to G.I.JOE*MFA* Send a message via Yahoo to G.I.JOE*MFA*
well guess i still cant figure it out...

<a href="phPopUp('_URL_','520','600');">Privacy Policy</a>

Code:
<script language="JavaScript">
function phPopUp(url,x,y) {
//Window Open Function Copyright 2004 phphq.net
day=new Date();
id=day.getTime();
eval("page" + id + " = window.open(url, '" + id + "',  'toolbar=0,scrollbars=1,location=0,statusbar=0,men
ubar=0,resizable=1,width=" + x + ",height=" + y + "');");
}
</script>

i get wierd errors when i do it...

click on link and i get:
http://dfmafia.net/phPopUp('_URL_','520','600');
guessing phPopUp is the link to page i want
tried that and still had the ('_URL_','520','600'); at the end of the link

i know very little about javascript
__________________
DON'T LOOK AT MY SPELLING CAUSE IT SUCKS AND I DON'T CARE
__________________




*MaFiA*...Trust...Respect . . . Family

BF *MaFiA* - CoD *MaFiA* - DF *MaFiA* - JO *MaFiA* - RvS ¤MaFiA¤ - SW *MaFiA* - Capo Crimini
The Site



Reply With Quote
  #7  
Old 08-15-2004, 09:50 AM
Steve is offline Steve
Steve's Avatar
Administrator

Join Date: Sep 2001
Location: 2077
Posts: 21,552

Send a message via ICQ to Steve
i dont know much either but i was wondering of the page u want to popup should be ther instead of _URL_ ?
Reply With Quote
  #8  
Old 08-15-2004, 09:54 AM
G.I.JOE*MFA* is offline G.I.JOE*MFA*
Registered User

Join Date: Feb 2002
Posts: 437

Send a message via ICQ to G.I.JOE*MFA* Send a message via Yahoo to G.I.JOE*MFA*
i put it ther too and didnt work...
__________________
DON'T LOOK AT MY SPELLING CAUSE IT SUCKS AND I DON'T CARE
__________________




*MaFiA*...Trust...Respect . . . Family

BF *MaFiA* - CoD *MaFiA* - DF *MaFiA* - JO *MaFiA* - RvS ¤MaFiA¤ - SW *MaFiA* - Capo Crimini
The Site



Reply With Quote
  #9  
Old 08-15-2004, 09:59 AM
G.I.JOE*MFA* is offline G.I.JOE*MFA*
Registered User

Join Date: Feb 2002
Posts: 437

Send a message via ICQ to G.I.JOE*MFA* Send a message via Yahoo to G.I.JOE*MFA*
Code:
<script language="JavaScript">
function phPopUp(url,x,y) {
//Window Open Function Copyright 2004 phphq.net
day=new Date();
id=day.getTime();
eval("page" + id + " = window.open(url, '" + id + "',   'toolbar=0,scrollbars=1,location=0,statusbar=0,men

ubar=0,resizable=1,width=" + x + ",height=" + y + "');");
}
</script>

<div class="blockcontent"><div class="blockheader">Legal</div>
<a href="phPopUp('policy.html','520','600');">Privacy Policy</a><br>
<a href="phPopUp('terms.html','520','600');">Terms & Conditions</a>
<br><br>
</div>
link = http://dfmafia.net/phPopUp('policy.html','520','600');


Line: 546
Char: 107
Error: Unterminated String Constant
Code: 0
URL: http://dfmafia.net/index.php?

thats the error i get with the above script
__________________
DON'T LOOK AT MY SPELLING CAUSE IT SUCKS AND I DON'T CARE
__________________




*MaFiA*...Trust...Respect . . . Family

BF *MaFiA* - CoD *MaFiA* - DF *MaFiA* - JO *MaFiA* - RvS ¤MaFiA¤ - SW *MaFiA* - Capo Crimini
The Site



Reply With Quote
  #10  
Old 08-15-2004, 10:12 AM
G.I.JOE*MFA* is offline G.I.JOE*MFA*
Registered User

Join Date: Feb 2002
Posts: 437

Send a message via ICQ to G.I.JOE*MFA* Send a message via Yahoo to G.I.JOE*MFA*
heres an old script i used to use on a prior version of my site

Code:
<script LANGUAGE="JavaScript">
<!---hide script from old browsers

// Warning page
<!--self.name="Warning Page";

var oldNav = (
(navigator.appVersion.charAt(0)      != '4')    ||
(navigator.appVersion.substring(0,1) == '4 ')   ||
(navigator.appVersion.substring(0,2) == '4.0')  ||
(navigator.appVersion.substring(0,3) == '4.00') ||
(navigator.appVersion.substring(0,3) == '4.01') ||
(navigator.appVersion.substring(0,3) == '4.02')
);
var NewWin = false;
function NewWindow()
{
	if (navigator.appName == 'Netscape'){
		if (!NewWin || NewWin.closed){
		NewWin = window.open('index2.php','Content','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,dependent=no,screenX=0,screenY=0,width='+screen.width+',height='+screen.height+',top=0,left=0');
		}
		else NewWin.focus();
	} 
	else {              
        	if (!NewWin || NewWin.closed){
        	NewWin = window.open('index2.php','Content','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,dependent=yes,screenX=0,screenY=0,type=fullWindow,width='+screen.width+',height='+screen.height+',top=0,left=0');
        	}
        	else NewWin.focus();
        }
}

function NewWindow2()
{
	if (navigator.appName == 'Netscape'){
		NewWin = window.open('http://dfmafia.net/index.php',"content" ,'toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,dependent=no,screenX=0,screenY=0,width='+screen.width+',height='+screen.height+',top=0,left=0');
	} 
	else {              
        	NewWin = window.open('http://dfmafia.net/index.php',"content" ,'toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,dependent=yes,screenX=0,screenY=0,type=fullWindow,width='+screen.width+',height='+screen.height+',top=0,left=0');
        }
} 

//-->

</script>
and heres the link for it:

Code:
<p align="center">
<a href="javascript:NewWindow2()"><font face="Tahoma" size="5">
ENTER</font></a></p>
it worked like a champ - i wont use it cause i want a certain window size (W=520 x H=600)

this script maxed out the window - which people hated

i tried using it but it didnt work
__________________
DON'T LOOK AT MY SPELLING CAUSE IT SUCKS AND I DON'T CARE
__________________




*MaFiA*...Trust...Respect . . . Family

BF *MaFiA* - CoD *MaFiA* - DF *MaFiA* - JO *MaFiA* - RvS ¤MaFiA¤ - SW *MaFiA* - Capo Crimini
The Site



Reply With Quote
  #11  
Old 08-15-2004, 10:21 AM
G.I.JOE*MFA* is offline G.I.JOE*MFA*
Registered User

Join Date: Feb 2002
Posts: 437

Send a message via ICQ to G.I.JOE*MFA* Send a message via Yahoo to G.I.JOE*MFA*
Code:
<script language="JavaScript">
function phPopUp(url,x,y) {
//Window Open Function Copyright 2004 phphq.net
day=new Date();
id=day.getTime();
eval("page" + id + " = window.open(http://dfmafia.net/terms.html',"content"','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width="520",height="600"');");
}
</script>




<! --Begin Link-- !>

<a href="javascript:phPopUp('terms.html','520','600');">Private Policy</a><br>

<! --End Link-- !>
trying that1...


EDIT: a no-go...
__________________
DON'T LOOK AT MY SPELLING CAUSE IT SUCKS AND I DON'T CARE
__________________




*MaFiA*...Trust...Respect . . . Family

BF *MaFiA* - CoD *MaFiA* - DF *MaFiA* - JO *MaFiA* - RvS ¤MaFiA¤ - SW *MaFiA* - Capo Crimini
The Site



Reply With Quote
  #12  
Old 08-15-2004, 10:43 AM
G.I.JOE*MFA* is offline G.I.JOE*MFA*
Registered User

Join Date: Feb 2002
Posts: 437

Send a message via ICQ to G.I.JOE*MFA* Send a message via Yahoo to G.I.JOE*MFA*
PHP Code:
<div class="blockcontent"><div class="blockheader">Legal</div>
<
script language="JavaScript">
var 
WinNum=0;
function 
WindowOpen(Url,x,y)
{
var 
String;
String =  "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,copyhistory=0,";
String += ",width=";
String += x;
String += ",height=";
String += y;
WinPic=window.open(Url,WinNum++,String);
}
</
script>
<
img src="http://dfmafia.net/images/indicator.gif"> <a href="javascript:;" onclick="WindowOpen('http://dfmafia.net/terms.html',520,600)" class="head">Terms Conditions</a>
<
br>
<
img src="http://dfmafia.net/images/indicator.gif"> <a href="javascript:;" onclick="WindowOpen('http://dfmafia.net/policy.html',520,600)" class="head">Private Policy</a>
<
br><br>
</
div

got it to work - now just need to adjust my pages

what i did was use a couple of the codes i had and combine them with what u gave me till it worked out...i still have no idea how i did it but its working now
__________________
DON'T LOOK AT MY SPELLING CAUSE IT SUCKS AND I DON'T CARE
__________________




*MaFiA*...Trust...Respect . . . Family

BF *MaFiA* - CoD *MaFiA* - DF *MaFiA* - JO *MaFiA* - RvS ¤MaFiA¤ - SW *MaFiA* - Capo Crimini
The Site




Last edited by G.I.JOE*MFA*; 08-15-2004 at 10:54 AM.
Reply With Quote
  #13  
Old 08-15-2004, 11:07 AM
G.I.JOE*MFA* is offline G.I.JOE*MFA*
Registered User

Join Date: Feb 2002
Posts: 437

Send a message via ICQ to G.I.JOE*MFA* Send a message via Yahoo to G.I.JOE*MFA*
now ill show you what you need to do to do this as well:




<script language="JavaScript">
var WinNum=0;
function WindowOpen(Url,x,y)
{
var String;
String = "toolbar=0,location=0,directories=0,status=0,menub ar=0,scrollbars=1,resizable=0,copyhistory=0,";
String += ",width=";
String += x;
String += ",height=";
String += y;
WinPic=window.open(Url,WinNum++,String);
}
</script>

<a href="javascript:;" onclick="WindowOpen('Link To The Page You Want To Display',X,Y)" class="head">Name Of Your Page</a>



copy and paste the above script and then entid the stuff in RED

X = Width of window
Y = Height of window




in the java:

toolbar=0
0 = no tool bar
1 = tool bar

location=0
i dont know...lol...sorry
guessing where it will pop-up on your screen

directories=0
guessing its the address bar


status=0
0 = no status bar at bottom
1 = status bar is displayed at bottom

menubar=0
0 = no menus
1 = menus (File, Edit, View, Favorites, Tools, Help...) are displayed

scrollbars=1
0 = no scroll bar
1 = scroll bar is there (recommended set to 1 to view entire page)

resizable=0
0 = cant resize the page
1 = can resize he page

copyhistory=0
0 = doesnt go into history
1 = goes into your history
__________________
DON'T LOOK AT MY SPELLING CAUSE IT SUCKS AND I DON'T CARE
__________________




*MaFiA*...Trust...Respect . . . Family

BF *MaFiA* - CoD *MaFiA* - DF *MaFiA* - JO *MaFiA* - RvS ¤MaFiA¤ - SW *MaFiA* - Capo Crimini
The Site



Reply With Quote
  #14  
Old 08-15-2004, 11:17 AM
Steve is offline Steve
Steve's Avatar
Administrator

Join Date: Sep 2001
Location: 2077
Posts: 21,552

Send a message via ICQ to Steve
coolio

i was wondering about the location one also :/
Reply With Quote
  #15  
Old 08-15-2004, 11:43 AM
G.I.JOE*MFA* is offline G.I.JOE*MFA*
Registered User

Join Date: Feb 2002
Posts: 437

Send a message via ICQ to G.I.JOE*MFA* Send a message via Yahoo to G.I.JOE*MFA*
i kinda wish more peeps would take my lead and when they have a question and they end up fixing it either by themselves or with some help POST what the fix was so others can benifit from it

if i figure something out ill share it with others...
__________________
DON'T LOOK AT MY SPELLING CAUSE IT SUCKS AND I DON'T CARE
__________________




*MaFiA*...Trust...Respect . . . Family

BF *MaFiA* - CoD *MaFiA* - DF *MaFiA* - JO *MaFiA* - RvS ¤MaFiA¤ - SW *MaFiA* - Capo Crimini
The Site



Reply With Quote
  #16  
Old 08-15-2004, 11:50 AM
Scott is offline Scott
Scott's Avatar
AKA. Panther

Join Date: Sep 2001
Location: Minneapolis, MN
Posts: 10,933

Mine does work . You just do it wrong.

Put the script right before the </head> tag.

Vbulletin splits this line:

eval("page" + id + " = window.open(url, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,men

ubar=0,resizable=1,width=" + x + ",height=" + y + "');");




Into 2 lines.. make it 1 line.
__________________

04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq
Reply With Quote
  #17  
Old 08-15-2004, 11:53 AM
G.I.JOE*MFA* is offline G.I.JOE*MFA*
Registered User

Join Date: Feb 2002
Posts: 437

Send a message via ICQ to G.I.JOE*MFA* Send a message via Yahoo to G.I.JOE*MFA*
ah...heh...it ws b4 the </head> tag

i also checked the split...i saw it after a couple of tries...i gave up and went to my archives and bumped them against your script...though similar i couldnt get yours to work for some reason...even my archived script didnt work..till i used a bit of both till i got it to work..

__________________
DON'T LOOK AT MY SPELLING CAUSE IT SUCKS AND I DON'T CARE
__________________




*MaFiA*...Trust...Respect . . . Family

BF *MaFiA* - CoD *MaFiA* - DF *MaFiA* - JO *MaFiA* - RvS ¤MaFiA¤ - SW *MaFiA* - Capo Crimini
The Site



Reply With Quote
  #18  
Old 08-15-2004, 11:54 AM
Scott is offline Scott
Scott's Avatar
AKA. Panther

Join Date: Sep 2001
Location: Minneapolis, MN
Posts: 10,933

I made an example without the vb wrap..
Attached Files
File Type: zip example.zip (451 Bytes, 7 views)
__________________

04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq
Reply With Quote
  #19  
Old 08-15-2004, 12:17 PM
G.I.JOE*MFA* is offline G.I.JOE*MFA*
Registered User

Join Date: Feb 2002
Posts: 437

Send a message via ICQ to G.I.JOE*MFA* Send a message via Yahoo to G.I.JOE*MFA*
PHP Code:
<html>
<
head>
<
title>phPopup Test.</title>
<
script language="JavaScript">
function 
phPopUp(url,x,y) {
//Window Open Function Copyright 2004 phphq.net
day=new Date();
id=day.getTime();
eval(
"page" id " = window.open(url, '" id "',  'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=" ",height=" "');");
}
</
script>
</
head>
<
body>

<
a href="javascript:;" onclick="phPopUp('_URL_','520','600');">Privacy Policy.</a>

</
body>
</
html
PHP Code:
<script language="JavaScript">
function 
phPopUp(url,x,y) {
//Window Open Function Copyright 2004 phphq.net
day=new Date();
id=day.getTime();
eval(
"page" id " = window.open(url, '" id "',  'toolbar=0,scrollbars=0,location=0,statusbar=0,men
ubar=0,resizable=1,width=" 
",height=" "');");
}
</
script>

<! --
Begin LINK-- !>
<
a href="phPopUp('_URL_','520','600');">Privacy Policy.</a>
<! --
End Link-- !> 

notice the differances?

lol - you forot 1 minor part i the first code that messed me up...lmao...its ok panther...

<a href="phPopUp('_URL_','520','600');">Privacy Policy.</a>
was your original you showed me

<a href="javascript:;" onclick="phPopUp('_URL_','520','600');">Privacy Policy.</a>
is the example you just zipped and posted

i BOLDED the area that was missing

just to help those in the future...i understand this script more now..thanks!



once i saw that something was missing i went in and fixed it...though the script i used is bit longer it got the job done...

heres the 1 im using now:

PHP Code:
<script language="JavaScript"
var 
WinNum=0
function 
WindowOpen(Url,x,y

var 
String
String =  " toolbar=0,location=0,directories=0,status=0,menuba
r=0,scrollbars=1,resizable=0,copyhistory=0,"

String += ",width="
String += x
String += ",height="
String += y
WinPic=window.open(Url,WinNum++,String); 

</
script
<
img src="http://dfmafia.net/images/indicator.gif"> <a href="java script:;" onclick="WindowOpen('http://dfmafia.net/terms.html',520,600)" class="head">Terms Conditions</a
<
br
<
img src="http://dfmafia.net/images/indicator.gif"> <a href="java script:;" onclick="WindowOpen('http://dfmafia.net/policy.html',520,600)" class="head">Private Policy</a
Example.txt - use word pad to view the Bold Print better
__________________
DON'T LOOK AT MY SPELLING CAUSE IT SUCKS AND I DON'T CARE
__________________




*MaFiA*...Trust...Respect . . . Family

BF *MaFiA* - CoD *MaFiA* - DF *MaFiA* - JO *MaFiA* - RvS ¤MaFiA¤ - SW *MaFiA* - Capo Crimini
The Site




Last edited by G.I.JOE*MFA*; 08-15-2004 at 12:29 PM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Window Sized :/ .Simon. Web design and Programming 2 05-07-2005 11:06 AM
How Much Is That Barbie in the window Dragon-SC- Humor & Jokes 2 04-13-2005 09:49 AM
I fixed it up legit1 Sigs and Graphics 2 01-29-2005 12:20 AM
Getting popups? read this... BeBop Hardware and Software 5 12-11-2004 04:20 AM
ads / popups Steve Web design and Programming 6 10-10-2002 03:45 PM


All times are GMT -5. The time now is 12:17 AM.




Powered by vBulletin®