[Seaside] Issue with JSScript code generated in a render

John Toohey johnptoohey at gmail.com
Thu Mar 4 23:29:19 UTC 2010


FIrst issue after loading the JS-Core-lr.84 was :-

javascriptOn: aStream
	aStream javascript: self asMilliseconds
Message not Understood -> Duration >> asDuration

Then I get a :-

MessageNotUnderstood: WAHtmlDocument>>scriptGenerator

I am running Pharo Core RC1 and I loaded Seaside last night with this script :-
	[ Gofer new
		squeaksource: 'Seaside30';
		package: 'LoadOrderTests';
		load ]
			valueSupplyingAnswers: {
				{'Load Seaside'. true}.
				{'SqueakSource User Name'. ''}.
				{'SqueakSource Password'. ''}.
				{'Run tests'. false}.
			}

Do I need to upgrade the Seaside build to something else?

Thanks


On Thu, Mar 4, 2010 at 16:49, Lukas Renggli <renggli at gmail.com> wrote:
> Hmm, that's a very good catch. I wasn't aware of this problem.
>
> I propose a fix in Javascript-Core-lr.84. It is a bit expensive, but
> let me know if it solves the issue before I optimize and rewrite all
> tests.
>
> Lukas
>
>
> On 4 March 2010 20:50, John Toohey <jt at parspro.com> wrote:
>> I ran into an issue pushing data and a script via Comet to a brower.
>> My render generated correct HTML, plus this code :-
>>
>> <script type=\"text/javascript\">/*<![CDATA[*/$(\"#hp169\").spinner({min:1,max:99,step:0.25,increment:\"fast\",skipInitialChange:true,showOn:\"always\"})/*]]>*/</script>")
>>
>> This looks okay, but both FF and Chrome generate an error while
>> parsing it. FF mentions "unterminated string" and Chrome complains of
>> an Invalid TOKEN. I reduce the code to :-
>>  $("#markettable").prepend(
>>    "<script></script>"
>>   );
>> but this still gives an error.
>>
>> However, adding escaping the final forward / in the script tag fixes
>> this. I found a lot of reports of this issue on the net, and the
>> consensus seems to be to always escape a forward / whilst emitting JS
>> to the browser. Having trouble finding the method that generates the
>> tags, do anyone know where that is?
>>
>> --
>> -JT
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>
>
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>



-- 
-JT


More information about the seaside mailing list