Hi there
I have to read a javascript variable (myResultingID), this is the script: html html: '<script> ... var myResultingID = ''result''.concat(nextId); ... </script>' and I have to use it as a JQuery id, but if I write: html jQuery id: 'myResultingID', Seaside generates $('#myResultingID') see: html html: '<script> ..., ((html jQuery ajax callback: [ ... ] value: ...; onSuccess: ((html jQuery id: 'myResultingID') load html: [ :h | self renderMyValuesOn: h ])) greaseString ,... </script>' So I found an ugly solution i.e. replacing the Seaside generated string with the javascript right concatenation, see here: html html: '<script> ..., ((html jQuery ajax callback: [ ... ] value: ...; onSuccess: ((html jQuery id: 'myResultingID') load html: [ :h | self renderMyValuesOn: h ])) greaseString copyReplaceAll: '"#myResultingID"' with: '"#"+myResultingID') ,... </script>' Is there a better way? Thanks Dave |
I think the #expression: method will do what you want.
e.g. html jQuery expression: 'myResultingId'
|
Perhaps:
html jQuery expression: (html javascript alias: ‘myResultingId’) cheers Johan ps: I don’t see any text of your examples (copy/paste error?)
_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Thanks Johan, it works.
cheers Dave
|
Free forum by Nabble | Edit this page |