Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Using an image for submit button


This topic is 7164 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

A simple question:

XSLT / CWP

I want to use an image instead of the usual type="submit" button in a form.

So instead of...

input name="-find" type="submit" value="edit"

I want to use...

input name="-find" type="image" src="http://www.whatever.com/images/whatever.jpg"

At the moment this does not work. Any ideas?

Posted

Both examples can be enhanced. You should split name="-find" and type="..." in two input tags, then also the submit in the first example works if you just hit the return key.

So, in the first example, standard button:

<input type="hidden" name="-find" value="anything">

<input type="submit" value="Go">

In this example, the name attribute in input type="submit" should only be used if you many different submit buttons that should differentiate the data to be submitted.

Second example, graphical button:

<input type="hidden" name="-find" value="anything">

<input type="image" src="http://www.whatever.com/images/whatever.jpg" alt="some_explanatory_text">

Posted

Thanks Martin

I did what you said, but still having problems...

This works:

input type="submit" value="continue"/>

but if I replace it with this line:

input type="image" src="http://www.whatever.com.au/images/Continue.gif"/>

It doesn't work.

  • 2 weeks later...
Posted

Hello,

I think I'm in late but I will answer to your question anyway..

try to give your < input type="img" etc../ > tag the name '-token'

< input type="img" src="src.gif" name="-token" alt="submit"/ > ??? when a HTML form is submitted with 'get' method, the query contains the 'coordinates' of the image used to send data, if you specify '-token' as name of the image the resulting query will be 'accepted' by the FM web engine because '-token' is a valid query string param (it will finally looks like '-token.x=30&-token.y=30).

I hope this can help you!

Bye.

This topic is 7164 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.