Solved

Changing submit form object to an image and maintaining results

Posted on 2000-05-16
7
140 Views
Last Modified: 2013-12-24
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
Comment
Question by:jollymon6672
[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
7 Comments
 
LVL 5

Expert Comment

by:nathans
ID: 2816819
<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
 

Author Comment

by:jollymon6672
ID: 2817745
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
 
LVL 5

Expert Comment

by:nathans
ID: 2821297
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
Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

 

Author Comment

by:jollymon6672
ID: 2825540
Adjusted points from 1 to 10
0
 

Author Comment

by:jollymon6672
ID: 2825541
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
 
LVL 9

Accepted Solution

by:
Dain_Anderson earned 10 total points
ID: 2828426
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
 

Expert Comment

by:Xavi053000
ID: 2866779
Only type this:

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

and works in both navigators.
0

Featured Post

Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

Question has a verified solution.

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

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

734 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