Javascript action, encoding and semicolon

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Javascript action, encoding and semicolon

WiLi
Hi,

<g:submitButton action="submitToKV" onclick="return confirm('Teilnahmebestätigung');" /> 
results in
<input ... onclick="return confirm(Teilnahmebest&auml;tiigung');"  />

The semiclon in ü lets Safari open alert boxes in infinite loop.

onclick="${message(code:'xxx.xxx', encodeAs:'JavaScript')}" does not affect the problem.

How can I get rid of this HTML encoding?

File is UTF-8 with <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> included.

Reply | Threaded
Open this post in threaded view
|

Re: Javascript action, encoding and semicolon

WiLi
Sorry, this is how my problem looks like: <input ... onclick="return confirm(Teilnahmebest & a u m l ; tiigung');"  /> 
Reply | Threaded
Open this post in threaded view
|

Re: Javascript action, encoding and semicolon

Eugen Melnichuk
In reply to this post by WiLi
Hi,

1. it looks like there is a ' missing in confirm(Teilnahmebestätiigung');
2. try confirm(unescape('Teilnahmebest%E4tiigung'));

ciao


2010/7/1 WiLi <[hidden email]>

Hi,

<g:submitButton action="submitToKV" onclick="return
confirm('Teilnahmebestätigung');" />
results in
<input ... onclick="return confirm(Teilnahmebestätiigung');"  />

The semiclon in ü lets Safari open alert boxes in infinite loop.

onclick="${message(code:'xxx.xxx', encodeAs:'JavaScript')}" does not affect
the problem.

How can I get rid of this HTML encoding?

File is UTF-8 with <meta http-equiv="Content-Type" content="text/html;
charset=UTF-8" /> included.


--
View this message in context: http://grails.1312388.n4.nabble.com/Javascript-action-encoding-and-semicolon-tp2274459p2274459.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: Javascript action, encoding and semicolon

WiLi
Teilnahmebest%E4tiigung - very nice!

Thank you!
Reply | Threaded
Open this post in threaded view
|

Re: Javascript action, encoding and semicolon

irfanansari
BTW, does action work within <g:submitButton> ?
Reply | Threaded
Open this post in threaded view
|

Re: Javascript action, encoding and semicolon

irfanansari
I found myself that support for action is not added yet. More details on the ticket

http://jira.codehaus.org/browse/GRAILS-3662