[Seaside] Space Breaking LiveCallback in IE
Ron Teitelbaum
Ron at USMedRec.com
Mon Oct 30 23:18:18 UTC 2006
Teach me to hit alt-s in an email! Sorry.
It does appear to work just fine in IE as long as the space is not there.
The rest of the code is here:
renderSimpleSearchOn: html
html form defaultAction: [self search]; with: [
html table id: 'searchTable'; with: [
html tableRow: [
html tableData: [html text:
'First Name: '].
html tableData: [html
textInput value: 'Enter First Name'].
].
html tableRow: [
html tableData: [html text:
'Last Name: '].
html tableData: [html
textInput value: 'Enter Last Name'].
].
].
html submitButton
id: 'findPerson';
callback: [self search];
text: 'Search'.
].
renderAdvancedSearchOn: html
html form defaultAction: [self search]; with: [
html table id: 'searchTable'; with: [
html tableRow: [
html tableData: [html text:
'First Name: '].
html tableData: [html
textInput value: 'Enter First Name'].
].
html tableRow: [
html tableData: [html text:
'Middle Name: '].
html tableData: [html
textInput value: 'Enter Middle Name'].
].
html tableRow: [
html tableData: [html text:
'Last Name: '].
html tableData: [html
textInput value: 'Enter Last Name'].
].
html tableRow: [
html tableData: [html text:
'Name Suffix: '].
html tableData: [html
textInput value: 'Enter Name Suffix'].
html tableData: [html text:
'(Sr. Jr. III ...)'].
].
].
html submitButton
id: 'findPerson';
callback: [self search];
text: 'Search'
].
I wasn't aware that the last two alerts were causing the problem. Funny too
cause those were the only ones I tried! Thanks for pointing that out!
Ron Teitelbaum
_____
From: Ron Teitelbaum [mailto:Ron at USMedRec.com]
Sent: Monday, October 30, 2006 6:10 PM
To: 'Michel Bany'; 'The Squeak Enterprise Aubergines Server - general
discussion.'
Subject: RE: [Seaside] Space Breaking LiveCallback in IE
It does appear to work in IE as long as the space is not there
renderContentOn: html
html break.
html anchor
id: 'advancedSearch';
callback: ["noop"];
liveCallback: [:h | self toggleSearchType.
self renderContentOn: h];
text: (self isSimpleSearch ifTrue: ['Advanced
Search'] ifFalse: ['Simple Search']).
html div id: 'searchForm'; with: [
self isSimpleSearch ifTrue: [self
renderSimpleSearchOn: html]
ifFalse: [self renderAdvancedSearchOn: html]].
_____
From: Michel Bany [mailto:michel.bany at gmail.com]
Sent: Monday, October 30, 2006 4:31 PM
To: Ron at USMedRec.com; The Squeak Enterprise Aubergines Server - general
discussion.
Subject: Re: [Seaside] Space Breaking LiveCallback in IE
Hi Ron,
This is just a test app, but it has a toggle anchor that shows different
search forms. If a form has a table that has table data that only includes a
space the live update fails in a strange way. By uncommenting the alerts on
the #ajax method I saw the error:
>From your description, I understand that your callback generates a form,
i.e. something like
liveCallback: [:renderer |
...
renderer form: [ ... ]
...
].
I believe this won't work with IE. The #ajax js, uses innerHTML to update
the DOM and I believe
that IE does not allow form tags in this case.
But, maybe, you are trying something else....
This works fine for Firefox. But I also noted that having an alert in the
fireFox code causes the liveUpdate to not work at all.
As far as I can remember, I believe that only the last two alerts are
specific to IE, i.e. the ones sending parseError.
HTH
Michel.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20061030/bc1b9619/attachment-0001.htm
More information about the Seaside
mailing list