?
Solved

Why does changing submit button to image break this form?

Posted on 2011-09-28
4
Medium Priority
?
474 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
  • 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

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

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

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

840 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