W3C home > Mailing lists > Public > www-forms@w3.org > March 2005

RE: Button with an image.

From: Klotz, Leigh <Leigh.Klotz@xerox.com>
Date: Mon, 21 Mar 2005 16:32:55 -0800
Message-ID: <E254B0A7E0268949ABFE5EA97B7D0CF43834DF@usa7061ms01.na.xerox.net>
To: Borja Bravo Alférez <borjab@dat.etsit.upm.es>, <www-forms@w3.org>

Can you send a full example, trimmed down to contain only the essentials necessary to reproduce your problem?

You might try it in other browsers as well, such as FormsPlayer or Novell's Internet Explorer plug-in or the Mozilla Firefox XForms 0.1 extension that is part of the recent Firefox nightly builds.

In most of these, you can get an image as a label on a button, with no surrounding decoration by doing the following:
 (assuming the default namespace is XHTML 1 and xf is the XForms 1.0 namespace:
 <xf:trigger appearance="minimal"><xf:label><img src="foo.png alt="Submit" /></xf:label>...</xf:trigger> 

If it turns out that, in the browser of your choice, trigger displays properly but submit doesn't, you can use the XForms <send> action inside the trigger.  Ask here again if you need help with that taks.


-----Original Message-----
From: www-forms-request@w3.org [mailto:www-forms-request@w3.org] On Behalf Of Borja Bravo Alférez
Sent: Monday, March 21, 2005 7:05 AM
To: www-forms@w3.org
Subject: Button with an image.

Dear list members,

    I am working in a Xform application and someone made something like:

        <xf:submit submission="grabar">
                            <h:img src="../images/cmdSave.gif" />

The validator and Xsmiles think that it is bad code. I think as some 
browsers can't read an image. However I think there must be a way of 
implementing an xform equivalent of an botton with an image on it. Isn't 
it? I hope you can help me,

Thanks in advance,


P.D: By the way. I have tried

        <xf:submit submission="grabar">
                <xf:label> Save </xf:label>
                            <h:img src="../images/cmdSave.gif" />
It displays the image next to the button, but:
A) we need to remove the text of the label
B) The image can't trigger events.
Received on Tuesday, 22 March 2005 00:37:08 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:14 UTC