Solved

Submit buttons not working

Posted on 2012-12-23
1
451 Views
Last Modified: 2012-12-23
I am replacing button images with simple buttons to make things easier. Using classic ASP

This is an image that works as a button, when clicked it submits a form with certain parameters:

       <input name="imageField" type="image" onClick="document.form1.action='Emailforms.asp?caseid=<%=(Casesjoin.Fields.Item("Id").Value)%>'" src="../../../Images/Buttons/BtEmailForms.gif" width="84" height="20" border="0">

The above works great, form is submitted, I am replacing with a form button with the same action, but the form button doesnt work, is there something wrong in the syntax ?

 <input name="imageField" type="button" class="bodytext" id="imageField" onClick="document.form1.action='Emailforms.asp?caseid=<%=(Casesjoin.Fields.Item("Id").Value)%>'" value="    Email Forms    ">
0
Comment
Question by:amucinobluedot
1 Comment
 
LVL 4

Accepted Solution

by:
jmdl1983 earned 500 total points
ID: 38717083
you are changing the action value of the form, but not telling it to submit.

<input name="imageField" type="button" class="bodytext" id="imageField" onClick="document.form1.action='Emailforms.asp?caseid=<%=(Casesjoin.Fields.Item("Id").Value)%>'" value="    Email Forms    ">

Open in new window


should become

 
<input type="button" name="imageField" id="imageField" class="bodytext" onClick="document.form1.action='Emailforms.asp?caseid=<%=(Casesjoin.Fields.Item("Id").Value)%>';document.form1.submit();" value="    Email Forms    ">

Open in new window

0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Read about why website design really matters in today's demanding market.
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now