0

HI!
I just wanted to ask a question.
All the code looks good and works exept for this line

<input name="btn1" type="image" onMouseOut="turnYellow()" onMouseOver = "turnGreen()"/>
      <img name="signin" src="images/images/images/sign-in.gif" border="0">;

What I am trying to do is use an image instead of the standard submit button.
Anyone know why this may not be working?
Thanks!

3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by phpDave
0

At first you have to use the following code for using an image as input :

<input type="image" src="submit.gif" alt="Submit" />

Please submit the code for both functions.

0

You can use the image as a link

<a href="..."><img src="images/images/images/sign-in.gif" border="0"></a>
0

Thanks for replies!
I rewrote the code a little. It works fine unless it is inside a php tag, then the mouse effects dont work. Here is the new code in it's entirety.

<div id="title">
<form id="form1" name="form1" method="POST" action="<?php echo $loginFormAction; ?>">
<?php
  if (!array_key_exists('MM_Username', $_SESSION)) {echo
   'User Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="blue"><a href="registration.php">Sign Up!</a></span>
   
      <input name="user_name" type="text" id="user_name" maxlength="20" />
      <br />
      Password:
      <input name="pwd" type="password" id="pwd" maxlength="9" /><br/><br/>
	  <input name="btn1" type="image"src="images/images/images/sign-in.gif"
	  [B]onMouseOut ="src=.images/images/images/sign-in.gif."; 
	  onMouseOver ="src=.images/images/images/sign-in2.gif.";>[/B]
     
   ';}
	  else {echo
	  'You are logged in:<br/><br/>
	  <a href="your-account.php">Return to your account</a><br/><br/>
	  <a href="'.$logoutAction.'" onMouseOut="turnOrange()" onMouseOver = "turnBrown()">
	  <img name="out" src="images/images/images/log-out.gif" border="0">
	  </a>
	  ';}
	 ?>
     </form>
  </div>

The bold area is where the problem is at. It works fine if I take it outside php tags.
Any suggestions?
Also, I tried ' marks on each side, still does not work.
Thanks

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.