Forum Moderators: open

Message Too Old, No Replies

html en php in IE8

         

Jiheld

8:15 pm on Jan 11, 2010 (gmt 0)

10+ Year Member



Hi, i am making a arcade website,

I make this in phpbb3.06 premod 5.0

Now I have the following problem:

I made a custom portal block in php:


<?php

if (!defined('IN_PHPBB'))
{
exit;
}

global $user, $db;

if ($user->data['is_registered']){
$dat = $user->data['user_id'];
$link = '<iframe src ="http://www.example.com/channel_auth.asp?channel_id=33202&uid=';
$link .= $dat;
$link .= '&nick_name=';
$link.= $user->data['username'];
$link .='&auth_sig=';
$channel = '23b7f054e101a14674b51c9f0d7dfee2';
$combine = $datŠ$channel;
$combimix= md5($combine);
$link .= $combimix ;
$link .='" width="850" name="galleryframe" id="galleryframe" height="520" frameborder="0" scrolling="no" allowtransparency="true" >';
$link .='<p>Your browser does not support iframes.</p>';
$link .='</iframe>';
}else{
$link .= '<center> You need to be logd in to see this iframe';
}

// Assign specific vars
$template->assign_vars(array(
'I_FRAME' => $link,
));
$template->set_filenames(array(
'body' => 'portal/block/multiplay.html',
));

And made a HTML file to enter the php with buttons.


<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>

<body onLoad="MM_preloadImages('styles/X-TremeRed/theme/images/buttons/players_2.png', 'styles/X-TremeRed/theme/images/buttons/games_3.png', 'styles/X-TremeRed/theme/images/buttons/rewards_2.png', 'styles/X-TremeRed/theme/images/buttons/stats_2.png')">
<center>
<table cellspacing="0" width="100%">
<tr>
<td ALIGN="center">{I_FRAME}</td>
</tr>
<tr>
<td valign="top" align="center">


<a href="http://www.example.com/player_gallery_frame.asp?channel_id=33202&t=1" TARGET="galleryframe" onMouseOver="MM_swapImage('games','','styles/X-TremeRed/theme/images/buttons/games_2.png',1)" onMouseOut="MM_swapImgRestore()">
<img src="styles/X-TremeRed/theme/images/buttons/games_4.png" alt="games" name="games" width="100" height="40" border="0"></a>

<a href="http://www.example.com/player_gallery_frame.asp?channel_id=33202&t=2" TARGET="galleryframe" onMouseOver="MM_swapImage('Player','','styles/X-TremeRed/theme/images/buttons/players_2.png',1)" onMouseOut="MM_swapImgRestore()">
<img src="styles/X-TremeRed/theme/images/buttons/player_1.png" alt="Players" name="Player" width="100" height="40" border="0"></a>

<a href="http://www.example.com/player_gallery_frame.asp?channel_id=33202&t=3" TARGET="galleryframe" onMouseOver="MM_swapImage('rewards','','styles/X-TremeRed/theme/images/buttons/rewards_2.png',1)" onMouseOut="MM_swapImgRestore()">
<img src="styles/X-TremeRed/theme/images/buttons/rewards_1.png" alt="Rewards" name="rewards" width="100" height="40" border="0"></a>

<a href="http://www.example.com/player_gallery_frame.asp?channel_id=33202&t=4" TARGET="galleryframe" onMouseOver="MM_swapImage('statistics','','styles/X-TremeRed/theme/images/buttons/stats_2.png',1)" onMouseOut="MM_swapImgRestore()">
<img src="styles/X-TremeRed/theme/images/buttons/stats_1.png" alt="statistics" name="statistics" width="100" height="40" border="0"></a>

</td>
</tr>
</table>
</center>

Now i have a test site and the main site.
On the test site it all works perfect, if you press a button in the portal page the link opens in the same portal. This also works on FF.

Got the same 2 codes on my main site, but when you press a button there a new windows opens with the information.
They are exactly the same files.
How can it be that on my main site a new windows opens and on my test site the same window get used?

The weird thing is, on the main site, when you right click on a button and click open link, it opens in the same window.

The both site have a diffrent DB, but the info there is all the same.

What can be this the problem? I want my buttons in the portal window open in the same window as on the testing site.

In FF i have no problem, its only in IE. Running windows 7 btw.

Somebody has a clue?

thnx.

Jih.

[edited by: tedster at 8:27 pm (utc) on Jan. 11, 2010]
[edit reason] no specific websites, please - use example.com [/edit]

Drag_Racer

10:44 pm on Jan 11, 2010 (gmt 0)

10+ Year Member



TARGET="galleryframe"
this part of your code is why the new window unless a window with that name already exists.

Jiheld

9:32 am on Jan 12, 2010 (gmt 0)

10+ Year Member



I changed the name, byt still the same problem :(

Drag_Racer

8:25 pm on Jan 12, 2010 (gmt 0)

10+ Year Member



you could remove the target and it will default to the current window...

[w3.org...]