Jump to content

HREF not working in IE8


honkmaster

Recommended Posts

The below code provides a HREF link which works in Safari But not IE8, any help would be great cheers Chris

<?php$con = mysql_connect("localhost","xx","xx");if (!$con)  {  die('Could not connect: ' . mysql_error());  }mysql_select_db("xx", $con);date_default_timezone_set('Europe/London');$result = mysql_query("SELECT * FROM garage ORDER BY id DESC");	   echo "<table width='715' border='0' cellspacing='2' cellpadding='5'><tr class='tableHead'><th>Company</th><th>Contact</th><th>Postcode</th><th>Status</th><th>View</th></tr>";	   	   while($myrow = mysql_fetch_array($result))					 {  echo "<tr class='tableBody' align='center'>";  echo "<td>" . $myrow['company'] . "</td>";  echo "<td>" . $myrow['contact'] . "</td>";  echo "<td>" . $myrow['postcode'] . "</td>";    echo "<td>" . $myrow['status'] . "</td>";  echo "<td>" . "<a href=\"viewallgarageprocess.php?id=$myrow[id]\"><input type='image' src='../images/view.png' width='51' height='25' /></a>" . "</td>";  echo "</tr>";			 }?>

Link to comment
Share on other sites

If that <input> is within a form then it's going to submit the form to the URL that's in the "action" attribute.Instead of an <input> why not use the <img> tag?

Link to comment
Share on other sites

I can't blame a browser for getting confused when it sees an input inside a link. I suspect the W3 specification does not recommend a specific course of action for this, so it's no surprise one browser should interprets it one way, and a different browser interprets it a different way.Make a choice. Is it a link or an input? Don't try to make it both.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...