Jump to content

HREF not working in IE8


honkmaster
 Share

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...