You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Marcin Okraszewski <ok...@o2.pl> on 2004/04/08 13:03:30 UTC

[Woody] IE sends values of buttons - SubmitWidget can only be set once

Hi,
I wanted to make an image button, which I render in fallowing way:

<xsl:template match="wi:action[wi:styling/@type='image']">
   <button type="submit"
	  name="{@id}" id="{@id}"
   	  value="normalize-space(wi:label)">
     <img src="{wi:styling/@src}"
	 alt="{normalize-space(wi:label)}"
          title="{normalize-space(wi:hint):>
   </button>
</xsl:template>

It works fine with Mozilla, but when I tried IE I received an exception 
(there are more than one such button):

uncaught JavaScript exception: at menu 
(file:/var/www/webapps/ROOT/admin/flows/menu.js, Line 70) at 
(resource://org/apache/cocoon/woody/flow/javascript/woody2.js, Line 
148): java.lang.IllegalStateException: SubmitWidget can only be set once.

Other How can I avoid sending value of unselected button by IE? Of 
course I can use <input type="image">, but what about more advanced buttons?

I'm using Cocoon 2.1.4-dev.

Regards,
Marcin Okraszewski

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: [Woody] IE sends values of buttons - SubmitWidget can only be set once

Posted by Marcin Okraszewski <ok...@o2.pl>.
 From specification:
----
Buttons created with the BUTTON element function just like buttons 
created with the INPUT element, but they offer richer rendering 
possibilities: the BUTTON element may have content. For example, a 
BUTTON element that contains an image functions like and may resemble an 
INPUT element whose type is set to "image", but the BUTTON element type 
allows content.
---

So, it is a IE bug for me. If you make a submit button, it should rather 
not send its value unless it is pressed. But IE sends the value, what 
completely confuses Woody - it is impossible to determine which button 
was pressed. It doesn't matter if you use client-side JS.

Regards,
Marcin Okraszewski


> 
> Can we say it is a IE bug? What do the HTML specs say? Is client-side JS 
> processing used?
> 
> I'm using cforms, too, but I never use any of the features that require 
> a JS capable client. (I had very good reasons for that solemn promise, 
> never again relying on client capabilities beyond HTML.)
> 
> /Leo
> 
> 
> 
> On Apr 10, 2004, at 3:56 PM, Marcin Okraszewski wrote:
> 
>> The more I'm into creating webapps the more I'm fed up with IE. The 
>> worst is that users even don't have the faintest idea how many 
>> problems people have because they use IE.
>>
>> Marcin Okraszewski
>>
>>
>>
>>> Be sure, you are not the only one:
>>> http://marc.theaimsgroup.com/?t=107962802400002&r=1&w=4
>>> I figured out the problem, suggested a solution (but have not thought 
>>> deeper about it), but did not do anything on it.
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: [Woody] IE sends values of buttons - SubmitWidget can only be set once

Posted by leo leonid <te...@leonid.de>.
Can we say it is a IE bug? What do the HTML specs say? Is client-side 
JS processing used?

I'm using cforms, too, but I never use any of the features that require 
a JS capable client. (I had very good reasons for that solemn promise, 
never again relying on client capabilities beyond HTML.)

/Leo



On Apr 10, 2004, at 3:56 PM, Marcin Okraszewski wrote:

> The more I'm into creating webapps the more I'm fed up with IE. The 
> worst is that users even don't have the faintest idea how many 
> problems people have because they use IE.
>
> Marcin Okraszewski
>
>
>
>> Be sure, you are not the only one:
>> http://marc.theaimsgroup.com/?t=107962802400002&r=1&w=4
>> I figured out the problem, suggested a solution (but have not thought 
>> deeper about it), but did not do anything on it.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: [Woody] IE sends values of buttons - SubmitWidget can only be set once

Posted by Marcin Okraszewski <ok...@o2.pl>.
The more I'm into creating webapps the more I'm fed up with IE. The 
worst is that users even don't have the faintest idea how many problems 
people have because they use IE.

Marcin Okraszewski



> Be sure, you are not the only one:
> http://marc.theaimsgroup.com/?t=107962802400002&r=1&w=4
> 
> I figured out the problem, suggested a solution (but have not thought 
> deeper about it), but did not do anything on it.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: [Woody] IE sends values of buttons - SubmitWidget can only be set once

Posted by Joerg Heinicke <jo...@gmx.de>.
On 08.04.2004 13:03, Marcin Okraszewski wrote:

> Hi,
> I wanted to make an image button, which I render in fallowing way:
> 
> <xsl:template match="wi:action[wi:styling/@type='image']">
>   <button type="submit"
>       name="{@id}" id="{@id}"
>         value="normalize-space(wi:label)">
>     <img src="{wi:styling/@src}"
>      alt="{normalize-space(wi:label)}"
>          title="{normalize-space(wi:hint):>
>   </button>
> </xsl:template>
> 
> It works fine with Mozilla, but when I tried IE I received an exception 
> (there are more than one such button):
> 
> uncaught JavaScript exception: at menu 
> (file:/var/www/webapps/ROOT/admin/flows/menu.js, Line 70) at 
> (resource://org/apache/cocoon/woody/flow/javascript/woody2.js, Line 
> 148): java.lang.IllegalStateException: SubmitWidget can only be set once.
> 
> Other How can I avoid sending value of unselected button by IE? Of 
> course I can use <input type="image">, but what about more advanced 
> buttons?

Be sure, you are not the only one:
http://marc.theaimsgroup.com/?t=107962802400002&r=1&w=4

I figured out the problem, suggested a solution (but have not thought 
deeper about it), but did not do anything on it.

Joerg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org