PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old June 8th, 2004, 11:26 PM
Alicia Alicia is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 116 Alicia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 27 m 49 sec
Reputation Power: 5
popup js in php file

Hi guys,

could guys give me an idea why my code is not working ?? the popup javascript seems okay but the exit popup part doesn't seem to work as what i want no matter what value i assigned to $exit...

please advise.

Code:
<html>

<head>
<title>No title</title>
<meta name="generator" content="Namo WebEditor v5.0">
<script language="JavaScript" type="text/JavaScript">
<?
$popup = "1";
if($popup =="") 
{
?>
window.open('popup.htm','','menubar=no,resizable=y  es,width=430,height=580');
<?
}
$exit ="";
?>
var exit=true;
function xitpop()
{
	 if (exit)
	{
		window.open("http://www.yahoo.com","sample","height=500,width=604,status=yes,menubar=no,locatio  n=no,resizable=no,titlebar=yes,scrollbars=yes,top=  50,left=50");
	}
}

</script>
</head>

<body <? if($exit == ""){?>onunload="xitpop();"<? } ?> bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
<p><a href="http://www.yahoo.com"> hehe </a></p>
</body>

</html>

Reply With Quote
  #2  
Old June 15th, 2004, 10:39 PM
KonaBreath KonaBreath is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 4 KonaBreath User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
What I notice right away is these lines of code

$popup = "1";
if($popup =="")


why is there an if statement when you are setting $popup="1" right above it?
How would popup ever equal "" if you have just set it to "1".

HTH

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > popup js in php file


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway