Javascript help

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
RX2 Group
Forum Newbie
Posts: 3
Joined: Mon Oct 07, 2002 7:55 am
Location: Colorado

Javascript help

Post by RX2 Group »

Ok, I know this has been beaten to death, but I'll be damned if I can get it to work. Here is what I had (not the entire script, but the java part):

Code: Select all

$x = explode("]-_-ї",$idsї$id]);
if ($xї3] > 0) {
	$sql = "UPDATE $xї2] SET out=out+1, credits=credits-1 WHERE id='$xї0]'";
} else {
	$sql = "UPDATE $xї2] SET out=out+1 WHERE id='$xї0]'";
}
$result = $s24_sql->query($sql);
$url = $xї1];

$content = "URL: $url";
setcookie($cookiename, $content, time()+($hours*60*60));

if (empty($url)) {
	exit;
}

echo "function popup() {\n";
echo "  window.open('$url','popup','scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no');\n";
echo "  self.focus();\n";
echo "}\n";
?>
Now I want to get rid of the pop in this instance, and ad the following:

Code: Select all

<script language="JavaScript"><!--
if (window.screen) &#123;
    window.moveTo(0,0);
    window.outerHeight = screen.availHeight;
    window.outerWidth = screen.availWidth;
self.resizeTo(screen.availWidth,screen.availHeight);
&#125;
//--></script>

<script language="JavaScript1.2">
var minWidth=600,minHeight=350;
var animRate = 25;
var ie5_nn6=false;
var ie_ver=0;
var nn_ver=0;
var target_url = "http://adscruise.com/rotate/r1.html";
//check browser
if (navigator.appVersion.indexOf("MSIE")!=-1)&#123;
  temp=navigator.appVersion.split("MSIE");
  ie_ver=parseFloat(temp&#1111;1]);
&#125;
if(navigator.appName=="Netscape")&#123;
  if((ps=navigator.userAgent.indexOf("Netscape"))!=-1)&#123;
    tempstr=navigator.userAgent.substring(ps);
    if((ps=tempstr.indexOf("/"))!=-1)&#123;
      temp=tempstr.substring(ps+1,ps+4);
      nn_ver=parseFloat(temp);
    &#125;
  &#125;
&#125;
if (ie_ver>=5.0||nn_ver>=6.0)&#123;
  ie5_nn6=true;
&#125;
function createLayer(name, left, top, width, height, visible, content) &#123;
  if(ie5_nn6)&#123;
    document.writeln('<div id="' + name + '" style="position:absolute; overflow:none; left:' + left + 'px; top:' + top + 'px; width:' + width + 'px; height:' + height + 'px;' + ' visibility:' + (visible ? 'visible;' : 'hidden;') + '">');
    document.writeln(content);
    document.writeln('</div>');
  &#125;
&#125;
function hideLayer(name) &#123;
  var layer = getLayer(name);
  if(ie5_nn6)&#123;
    layer.visibility = "hidden";
  &#125;
&#125;
function showLayer(name) &#123;
There is more, but I am sure you get the idea.

I have tried to 'echo' every line, close the php, everything I can think of, to no avail. This page is called by the following tag in the HTML of the webpage.

Code: Select all

<SCRIPT LANGUAGE="JavaScript" SRC="http://rx2advantage.com/exit/popup.php?account=rx2group"></SCRIPT>
If somebody can help out a poor lost soul, it would be greatly appreciated. One day, I may actually get this all figured out. Then they will change it again!
User avatar
Johnm
Forum Contributor
Posts: 344
Joined: Mon May 13, 2002 12:05 pm
Location: Michigan, USA
Contact:

Post by Johnm »

Moved to Client Side


John M
Post Reply