Solved

Submit buttons not working

Posted on 2012-12-23
1
459 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
[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
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

The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

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. …
Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
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 get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

635 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