PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
scifirocket
Forum Commoner
Posts: 31 Joined: Fri Aug 13, 2010 1:24 am
Post
by scifirocket » Fri Jan 07, 2011 8:38 pm
IE7 doesn't like some of these lines. It appears to not echo out anything. However, when I remove the indicated code, the other echo statements work.
Code: Select all
$sql2="SELECT Address , Phone FROM Addresses WHERE EntryID=$sval";
$result2=mysql_query($sql2)or die(mysql_error());;
$numb = 1;
echo "<ul>";
while($row2=mysql_fetch_array($result2)){
$address =$row2['Address'];
$phone = $row2['Phone'];
// the stuff below this line doesnt work in IE 7
echo "<div id=\"light".$numb."\" class=\"white_content\"><a href=\"javascript:void(0)\" onclick=\"document.getElementById('light".$numb."').style.display='none';document.getElementById('fade').style.display='none'\"><b>Close</b></a><form action=\"http://maps.google.com/maps\" method=\"get\" target=\"_blank\"><br />Enter your starting address for directions:<br /><input type=\"text\" name=\"saddr\" /><input type=\"hidden\" name=\"daddr\" value=\"" .$address . ", Austin TX\" /><input type=\"submit\" value=\"get directions\" /><img src=\"http://maps.google.com/maps/api/staticmap?center=" .$address . ", Austin, TX&zoom=14&size=400x330&maptype=roadmap&markers=color:red|label:A|" .$address . ",Austin, TX&sensor=false\"></form></div>";
// end of problem code
echo "<li > Address ".$numb.": " .$address . " Phone: ".$phone." <a href=\"javascript:void(0)\" onclick=\"document.getElementById('light".$numb."').style.display='block';document.getElementById('fade').style.display='block'\">Map</a></li>";
$numb++;
}
echo "</ul>";
linda376
Forum Newbie
Posts: 1 Joined: Sun Jan 02, 2011 8:56 pm
Post
by linda376 » Sat Jan 08, 2011 1:03 am
Is IE 8 ok?
d3ad1ysp0rk
Forum Donator
Posts: 1661 Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA
Post
by d3ad1ysp0rk » Sat Jan 08, 2011 1:25 am
Can you please run this again, right click and click "View Source", then paste the HTML here? Thanks.
scifirocket
Forum Commoner
Posts: 31 Joined: Fri Aug 13, 2010 1:24 am
Post
by scifirocket » Sat Jan 08, 2011 1:41 pm
d3ad1ysp0rk wrote: Can you please run this again, right click and click "View Source", then paste the HTML here? Thanks.
im using ajax, so it's not printing out the source correctly.
d3ad1ysp0rk
Forum Donator
Posts: 1661 Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA
Post
by d3ad1ysp0rk » Sat Jan 08, 2011 2:07 pm
Is this live somewhere? I don't have a work environment on the computer I'm using right now so I can't test your script (with the DB and such), but I'm assuming it's a CSS issue or something just hiding the div.