[Lift] Re: How to Embed the flash dynamic in Snippet in the Lift ?

2009-11-12 Thread Neil.Lv
Tim, It can be shown correctly now! It's so cool and easy to use. Thank you very much ! Cheers, Neil On Nov 12, 9:08 pm, Timothy Perrett wrote: > Its a string because you havent properly escapped it... note that the code i > sent used the """CONTENT""" markers, thus you need to e

[Lift] Re: How to Embed the flash dynamic in Snippet in the Lift ?

2009-11-12 Thread Timothy Perrett
Its a string because you havent properly escapped it... note that the code i sent used the """CONTENT""" markers, thus you need to escape them properly. Cheers, Tim On 12 Nov 2009, at 12:02, Neil.Lv wrote: > Why the " flashSrc" is a string in the Script ? Maybe it should be "/ > flash/test.sw

[Lift] Re: How to Embed the flash dynamic in Snippet in the Lift ?

2009-11-12 Thread Neil.Lv
Tim, Here is the html code when i use the code in my Snippet, but it doesn't work. ### Code in the Snippet ### var flashSrc = "/flash/test.swf" var flashVar = "{name1=hello&name2=world&name3=foobar}" val script = """swfobject.embedSWF('" + flashSrc + "', 'myContent', '300', '120', '9.0.0

[Lift] Re: How to Embed the flash dynamic in Snippet in the Lift ?

2009-11-12 Thread Timothy Perrett
Neil, Try this: import net.liftweb.http.js._ import net.liftweb.http.js.JE._ import net.liftweb.http.js.JsCmds._ val script = """swfobject.embedSWF('" + flashSrc + "','myContent', '300', '120', '9.0.0', 'expressInstall.swf', '" + flashVar + "');""" def whatever(xhtml: NodeSeq):