jasonnetzley
21 Oct 2010, 12:40 AM
This is driving me crazy. The following code asks for a name and then prints a line of X's (using PHP). It works in every browser BUT Internet explorer. Can someone help me figure out why? I do know when I change the 'type' to 'submit' it works fine, but returning it to 'image' it stops working - It shows the button but when you click on it, the page just reloads and does not show the Xs. I'm just trying to make an image button that submits a post. THANKS FOR THE HELP!!!
<?php
if(isset($_POST['testbutton'])) {
echo "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
} ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
</head>
<body>
<form name="testform" method="post" action="">
<strong>Name</strong>
<input name="inputtext" type="text"/>
<input name='testbutton' value='testvalue' type='image' src='Images/Graphics/Submit_Dark.jpg'/>
</form>
</body>
</html>
<?php
if(isset($_POST['testbutton'])) {
echo "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
} ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
</head>
<body>
<form name="testform" method="post" action="">
<strong>Name</strong>
<input name="inputtext" type="text"/>
<input name='testbutton' value='testvalue' type='image' src='Images/Graphics/Submit_Dark.jpg'/>
</form>
</body>
</html>