• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 149
  • Last Modified:

Changing submit form object to an image and maintaining results

I would like to change a CF submit input to a type of image but retain the submit value for the query. any ideas?
0
jollymon6672
Asked:
jollymon6672
1 Solution
 
nathansCommented:
<form action="nextfile.cfm" method="post">

Form1:<input type="text" name="form1" size="25" maxlength="25"><br>
Form2:<input type="text" name="form2" size="25" maxlength="25"><br>
<br>
<input type="image" src="/minifusebox.gif" onclick="submit();"><br>
<br>
<input type="hidden" name="SUBMIT" value="GoSubmitValue">
</form>


Just think I did all this work and you are only giving out 1 point.

Nathan Stanford
www.nsnd.com
ColdFusion Tips Plus weekly e-ZINE
0
 
jollymon6672Author Commented:
Sorry about the points, I didn't quite understand how the point system worked. It was definitly worth more than that. Thanks for your help.
0
 
nathansCommented:
Well did this solve your problem... If so grade it...

If I answered your question that is..

Also grade according to how well the answer for the question you asked... Just thought I would let you know since your new.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
jollymon6672Author Commented:
Adjusted points from 1 to 10
0
 
jollymon6672Author Commented:
It was a solution for a single submit but I have multiple submits and it seems to cancel each other out. Any ideas? Thank you for all your help.
0
 
Dain_AndersonCommented:
By using the NAME attribute of the submit INPUT tag, you can evaluate which submit image was clicked on the refering page. The name of the submit button is passed as a form field which you can check to see if it exists. If it wasn't clicked, no value is passed.

-- form page:
<FORM METHOD="post" ACTION="someAction.cfm">
    <INPUT TYPE="Image" NAME="action1" SRC="image1.gif">
    <INPUT TYPE="Image" NAME="action2" SRC="image2.gif">
</FORM>

-- destination page:
<CFIF IsDefined("FORM.action1")>
    ...put code here...
</CFIF>

<CFIF IsDefined("FORM.action2")>
    ...put code here...
</CFIF>

This is a great way to have multiple action from a single form.

Hope that helps
0
 
Xavi053000Commented:
Only type this:

<input type="image" src="image.gif" value="submit" border="0">

and works in both navigators.
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now