By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,807 Members | 1,492 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,807 IT Pros & Developers. It's quick & easy.

why this iframe is not working for IE

P: 1
Hi here is my code for login.php file


<?php
error_reporting(E_ERROR | E_WARNING | E_PARSE);
include("../dbx.php");
?>
<?php

$do = $_GET["do"];
$login = $_POST["login"];
$password = $_POST["password"];

if($do == "logout")
{
setcookie('role', '', time() - 1);
setcookie('regusersite', '', time() - 1);
setcookie('login_name', '', time() - 1);
setcookie('login_username', '', time() - 1);
setcookie('PHPSESSID', '', time() - 1);
header("Location: index.php");
}
?>
<?php
if($_POST["do"] == "login")
{
$login = mysql_real_escape_string($login);
$password = mysql_real_escape_string($password);
$sql = "select username, password, role from manager where username = '$login' and password = '$password'";
$result = mysql_query($sql, $db);

if($myrow = mysql_fetch_array($result))
{
$role = $myrow["role"];
$username = $myrow["username"];
$password = $myrow["password"];
switch($role)
{
case "Admin" :
setcookie("role", "Admin");
setcookie("regusersite", "datageekAdmin");
setcookie("login_name", "Admin");
setcookie("login_username", $username);
break;

case "Moderator" :
setcookie("role", "Moderator");
setcookie("regusersite", "datageekAdmin");
setcookie("login_name", "Moderator");
setcookie("login_username", $username);
break;
}
header("Location: login.html");
exit;

}
else
{
//printf("Invalid Username or Password");
}
}
include("logincheck.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


<html>
<head>
<style>
h3 { border:dotted; border-color:#69F; background-color:#E1E1E1; font-size:14px ; font-family:Arial, Helvetica, sans-serif; text-align:center}
a { color:#14148B; font-size:10px ; font-family:Verdana, Geneva, sans-serif; text-decoration:none }
li { font-size:12px }
</style>
</head>
<body bgcolor="#ffffff">
<!--
<table width=100% bgcolor="#d2e4ff">
<tr>
<td align=left><font size=5 face="Arial, Helvetica, sans-serif"><b>Admin</b></font></td>
<td align=right valign=center><font size=2 face="Arial, Helvetica, sans-serif"><b>Hi, | <a href="login.php">Main Menu</a> | <a href="?do=logout">Logout</a></b></font>
</td>
</tr>
</table>

<?include("../index2.php"); ?>
-->
<?
switch($role)
{ case "Admin" :
include("../index2.php");
?>
<?
break;
case "Moderator" :
include("../index1.php");
?>
<?
break;
}
?>
<table width=100%>
<tr><td>
<table cellpadding=5 cellspacing=0>
<tr><td width="266">

</td>
<td width="90%" valign="top"><iframe height="420" width="98%" frameborder="1" scrolling="auto" name="ri8iframe" src="">Welcome Admin</iframe></td>
[/tr]
</table>

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

Code for Index2.php

<link rel="stylesheet" href="css/style1.css" type="text/css">
<script type="text/javascript">
function dropdown(){
document.getElementById("dropdown_menu").style.dis play = "block";
}
function mouseOut(){
document.getElementById("dropdown_menu").style.dis play = "none";
}
function dropdown_home(){
document.getElementById("dropdown_menu_home").styl e.display = "block";
}
function mouseOut_home(){
document.getElementById("dropdown_menu_home").styl e.display = "none";
}
function dropdown_stats(){
document.getElementById("dropdown_menu_stats").sty le.display = "block";
}
function mouseOut_stats(){
document.getElementById("dropdown_menu_stats").sty le.display = "none";
}
function dropdown_adduser(){
document.getElementById("dropdown_menu_adduser").s tyle.display = "block";
}
function mouseOut_adduser(){
document.getElementById("dropdown_menu_adduser").s tyle.display = "none";
}
function dropdown_footer(){
document.getElementById("dropdown_menu_footer").st yle.display = "block";
}
function mouseOut_footer(){
document.getElementById("dropdown_menu_footer").st yle.display = "none";
}


</script>


<div id="background">
<div id ="logo"></div>
<div id ="main_container">
<div id = "horizontal_spacer"></div>
<div id="header">
<div id = "banner"></div>
<div id="navigation">
<ul>
<li><a onmouseover="dropdown_home()" href="login.php"> Admin HOME </a></li>
<li><a onmouseover="dropdown()" href="login.php"> ABOUT US </a></li>
<li><a onmouseover="dropdown_stats()" href="login.php" > STATS </a></li>
<li><a onmouseover="dropdown_adduser()" href="login.php"> ADD USER </a></li>
<li><a onmouseover="dropdown_footer()" href="login.php"> FOOTER </a></li>
<li><a onmouseover="mouseOut()" href="?do=logout"> LOGOUT </a></li>
</ul>
</div>
</div>


<div id="dropdown_menu_home" onMouseOver="dropdown_home()" onMouseOut="mouseOut_home()">
<ul>

<li><a href="listpages.php" target="ri8iframe">services</a></li>

<li><a href="listtrendingtopics_new.php" target="ri8iframe">Trending Topics</a></li>
<li><a href="updateslider.php" target="ri8iframe">Slider</a></li>
</ul>
</div>
<div id="dropdown_menu" onMouseOver="dropdown()" onMouseOut="mouseOut()">
<ul>
<li><a href="aboutuslistpages.php" target="ri8iframe">About us</a></li>
<li><a href="aboutusmissionlistpages.php" target="ri8iframe">Mission</a></li>
<li><a href="aboutuswhatwedolistpages.php" target="ri8iframe">What We Do</a></li>
</ul>
</div>
<div id="dropdown_menu_stats" onMouseOver="dropdown_stats()" onMouseOut="mouseOut_stats()">
<ul>
<li><a href="statslistpages.php" target="ri8iframe">stats</a></li>
</ul>
</div>
<div id="dropdown_menu_adduser" onMouseOver="dropdown_adduser()" onMouseOut="mouseOut_adduser()">
<ul>
<li><a href="addmoderator.php" target="ri8iframe">Add User</a></li>
<li><a href="listmoderators.php" target="ri8iframe">List User</a></li>
</ul>
</div>
<div id="dropdown_menu_footer" onMouseOver="dropdown_footer()" onMouseOut="mouseOut_footer()">
<ul>

<li><a href="editprivacypolicy.php" target="ri8iframe">Privarcy Policy</a></li>
<li><a href="edittermsofuse.php" target="ri8iframe">Terms</a></li>
</ul>
</div>
</div>
</div>


In login.php file I have given link for index2.php file but in the <div id ="logo"></div>
tag some image is there which is the background image

iframe is overwitten on this background but its giving some problem in IE not FF. why this so?
Feb 29 '12 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.