RE: Button with an image.

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.

Leigh.


-----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">
                <xf:label>
                            <h:img src="../images/cmdSave.gif" />
                </xf:label>
        </xf:submit>

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,

    Borja





P.D: By the way. I have tried

        <xf:submit submission="grabar">
                <xf:label> Save </xf:label>
                            <h:img src="../images/cmdSave.gif" />
           </xf:submit>
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