Hello,
I’m a php newbie and I’m having a problem with iframes. I have a page which is set up to switch between two different urls in an iframe. The pages are set to switch every 24 hours. The page is showing up fine in Chrome, IE and Firefox, but in Safari, the wrong url shows up. Today, the page that’s supposed to come up is *** link removed by moderator *** link removed by moderator
This is the site: *** link removed by moderator
Here is my code:
[code=html]
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”><!– InstanceBegin template=”/Templates/Main.dwt” codeOutsideHTMLIsLocked=”false” –>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<!– InstanceBeginEditable name=”doctitle” –>
<title>New Jersey (NJ) Mortgage Lender, Mortgage Rates, Fha, Refinance & Home Loans</title>
<meta name=”description” content=”Get real time, accurate New Jersey (NJ) mortgage rates, refinancing and home loans.” />
<meta name=”keywords” content=”new jersey, nj, new jersey refinance, new jersey refinancing, FHA mortgage, jumbo mortgage, mortgage interest rate, mortgage, mortgage rates, mortgage broker, refinance, home loan, mortgage company, mortgage lender, mortgage refinancing, new jersey refinancing, home mortgage, mortgage interest rate” />
<meta name=”nibbler-site-verification” content=”3a321e0559840ef51087c274ba6f8be369e42dbf” />
<link rel=”shortcut icon” href=”favicon.ico” />
<?php
date_default_timezone_set(‘America/New_York’);
$brokers = array (
‘www.guaranteedrate.com/loanoptions/vpname/leezacharczyk’,
‘www.guaranteedrate.com/loanoptions/vpname/markzacharczyk’
);
$numbrokers = count($brokers);
$dayofyear = date(‘z’);
$todaysURL = ‘http://’.$brokers[$dayofyear%$numbrokers];
?>
<!– InstanceEndEditable –>
<!– InstanceBeginEditable name=”head” –>
<!– InstanceEndEditable –>
<link href=”css/GRateStyles.css” rel=”stylesheet” type=”text/css” />
<style>
@media print {
body {
color: #000;
background: #fff;
}
h1, h3 {
color: #000;
background: none;
}
#header, #footer, #leftNav, #right {
display: none;
}
@page {
margin: 2cm;
}
img {
max-width: 100% !important;
}
ul, img {
page-break-inside: avoid;
}
a {
font-weight: bolder;
text-decoration: none;
}
a[href^=http]:after {
content:” <” attr(href) “> “;
}
}
</style>
<style type=”text/css”>
body {
background-image: url(images/BkrdTexture.jpg);
background-repeat: repeat;
}
</style>
</head>
<body>
<div id=”wrapper”>
<div id=”header”>
<div id=”headerBox”>
<div id=”logo”><a href=”index.php”><img src=”images/Logo.jpg” width=”200″ height=”129″ alt=”Logo” /></a>
</div>
<div id=”headerRight”>
<div class=”headerRightContactText” id=”headerRightContact”><a href=”contact.html”>Contact</a> NewJerseyRates.com</div>
<div id=”headerRightTagline”>Customized, Automated NJ Mortgage Rate Quotes <span class=”redText”>Accurate and Up-to-the-Minute</span>
</div>
</div>
</div>
</div>
<div id=”navBar”>
<ul class=”navBar”>
<li class=”home”><a href=”index.php”>Home</a></li>
<li class=”faq”><a href=”faq.html”>FAQ</a></li>
<li class=”aboutCredit”><a href=”About-Credit.html”>About Credit</a></li>
<li class=”loanProg”><a href=”Loan-Programs.html”>Loan Programs</a></li>
<li class=”survey”><a href=”Survey.html”>Survey</a></li>
<li class=”homeInspec”><a href=”Home-Buyers-Info.html”>Home Buyers Info</a></li>
<li class=”about”><a href=”about_us.html”>About NewJerseyRates.com</a></li>
<li class=”partnerLinks”><a href=”links.html”>Partner Links</a></li>
<li class=”glossary”><a href=”gloss.html”>Glossary</a></li>
</ul>
</div>
<div id=”content”>
<div id=”leftNav”>
<ul class=”leftNav”>
<li class=”leftNavBuyHome”><a href=”Buying-a-Home.php”>Buying a Home<img class=”navArrowHome” src=”images/navArrow.gif” alt=”Nav Arrow” width=”11″ height=”11″/></a></li>
<li class=”leftNavRefi”><a href=”Refinance.php”>Refinance<img class=”navArrowRefi” src=”images/navArrow.gif” alt=”Nav Arrow” width=”11″ height=”11″/></a></li>
<li class=”leftNavRefi”><a href=”Loan-Options.php”>Loan Options<img class=”navArrowLoanOpt” src=”images/navArrow.gif” alt=”Nav Arrow” width=”11″ height=”11″/></a></li>
<li class=”leftNavRefi”><a href=”Mortgage-Rates.php”>Mortgage Rates<img class=”navArrowMort” src=”images/navArrow.gif” alt=”Nav Arrow” width=”11″ height=”11″/></a></li>
<li class=”leftNavRefi”><a href=”Calculators-GuaranteedRate.php”>Calculators<img class=”navArrowCalc” src=”images/navArrow.gif” alt=”Nav Arrow” width=”11″ height=”11″/></a></li>
<li class=”leftNavAbout”><a href=”About-GuaranteedRate.php”>About Us<img class=”navArrowAbout” src=”images/navArrow.gif” alt=”Nav Arrow” width=”11″ height=”11″/></a></li>
<li class=”leftNavPreApp”><a href=”Pre-Approval.html”>Instant Pre-Approval</a></li>
<li class=”leftNavCustomRates”><a href=”index.php”>Customized <br />
Mortgage Rates</a></li></ul>
</div>
<!– InstanceBeginEditable name=”Edit1″ –>
<div id=”editArea”>
<div id=”iframe”><iframe id=”iframeHome” src=”<?php echo $todaysURL ?>” frameborder=”0″>Browser Not Compatible</iframe></div>
</div>
<!– InstanceEndEditable –>
</div>
<div id=”footer”>
<div id=”template-footer”> 500 State Rt. 35 Middletown, New Jersey 07701 | <script type=”text/javascript”>
<!–
var linkText = “Email Us ”
var preName = “lee.zacharczyk”
var postName = “guaranteedrate.com”
document.write(“<a href=” + “mail” + “to:” + preName + “@” + postName + “>” + linkText + “</a>”)
//–>
</script> | Web Design by <a href=”http://www.littlechisel.com” target=”new”>Little Chisel Design</a> ©2013 All Rights Reserved</div>
</div>
</div>
</body>
<!– InstanceEnd –></html>
Thank you!