Solved

Why does changing submit button to image break this form?

Posted on 2011-09-28
4
459 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 500 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

737 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