Solved

Submit buttons not working

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

791 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