RussellB Posted April 5, 2005 Share Posted April 5, 2005 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? Link to comment Share on other sites More sharing options...
Martin Brändle Posted April 5, 2005 Share Posted April 5, 2005 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"> Link to comment Share on other sites More sharing options...
RussellB Posted April 6, 2005 Author Share Posted April 6, 2005 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. Link to comment Share on other sites More sharing options...
Martin Brändle Posted April 6, 2005 Share Posted April 6, 2005 Hmm. Is the input tag between the form /form tags? See also this link: http://www.w3.org/TR/html4/interact/forms.html#h-17.4.1 especially the paragraph on what is returned if the button is clicked, and this page (in german, but a working example) http://de.selfhtml.org/html/formulare/formularbuttons.htm#grafische Click on "Anzeigebeispiel: So sieht's aus" for the working example. Link to comment Share on other sites More sharing options...
AnFrusch@pepp Posted April 14, 2005 Share Posted April 14, 2005 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. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 6975 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 accountSign in
Already have an account? Sign in here.
Sign In Now