?
Solved

Why does changing submit button to image break this form?

Posted on 2011-09-28
4
Medium Priority
?
464 Views
Last Modified: 2012-05-12
Page: http://triadtestsite.com/mainstreet/index.php?option=com_aicontactsafe&view=message&layout=message&pf=1&Itemid=106

On this contact form I have a submit button which I want to change to an image. The code for this button currently looks like this: <input type="submit" id="aiContactSafeSendButton" value="' . JText::_('COM_AICONTACTSAFE_SEND') . '" style="float:left; margin:2px;" />

When I try to turn it into an image the contact form no longer submits. Below is the new code for the button that breaks the form.

<input type="image" src="images/send-button.jpg" id="aiContactSafeSendButton" value="' . JText::_('COM_AICONTACTSAFE_SEND') . '" style="float:left; margin:2px;" />

Any ideas on what is causing this or a workaround?

Thanks
0
Comment
Question by:elliottbenzle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 13

Accepted Solution

by:
Andrew Derse earned 2000 total points
ID: 36719849
Can you try this?

Instead of putting the src="images/send-button.jpg" in the input tag...

Why not put it in the template.css as this:

 
#aiContactSafeSendButton {
background-image: url('images/send-button.jpg');
}

Open in new window


Or something similar to that...
0
 
LVL 13

Expert Comment

by:Andrew Derse
ID: 36719852
First I would check to see if there already is a #aiContactSafeSendButton declaration in the css already.
0
 
LVL 4

Author Closing Comment

by:elliottbenzle
ID: 36719937
Thanks! That did it. The final code looked like this after a little tweeking:

#aiContactSafeSendButton {
  width: 150px;
  height: 100px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent url(../../../images/send-button.jpg) no-repeat center top;
  text-indent: -1000em;
  cursor: pointer; /* hand-shaped cursor */
  cursor: hand; /* for IE 5.x */
}
0
 
LVL 13

Expert Comment

by:Andrew Derse
ID: 36719949
Ah, you beat me to it...I was going to post more code to show you an example...
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Find out what you should include to make the best professional email signature for your organization.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question