On 24 Jun 2019, at 22:51, Walter Lee Davis <wa...@wdstudio.com> wrote:
> 
> Yup. That will stop a JavaScript insertion like you want to do cold. Try 
> replacing all of the newlines [and carriage returns, if any] with a single 
> space before you pass that value back to the Ajax request. It doesn't matter 
> how long the line is, as long as it's one line. I generally substitute 
> /[\n\r]+/ with ' ‘.

Thanks, Walter, but I’ve just this minute found the problem, and it was, as I 
knew it would be, a stupid one. Where I had "$('thisid').up('ul').insert 
(newhtml);”, all I had to do was take the quotes away from round ‘thisid’! I 
was sending a literal string to $ instead of the value represented by the 
variable and, oddly enough, there isn’t an element in the DOM with the id 
‘thisid’!

And btw, it does work with a few ‘\r's in it.

Thanks a million for your help. Now I have to fix the next problem...

-- 
Cheers... Chris
Chris Sansom: composer and… whatnot
http://www.chrissansom.net/
https://www.youtube.com/channel/UCVUKb7vK0KiIaiLhs7zht2Q
https://soundcloud.com/mfthoad

‌As every parent of a small child knows, converting a large object into small 
fragments is considerably easier than the reverse process.‌
— Andrew S. Tanenbaum‌

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prototype-scriptaculous+unsubscr...@googlegroups.com.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
Visit this group at https://groups.google.com/group/prototype-scriptaculous.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prototype-scriptaculous/8C59F928-105C-459A-A646-ABAB4BC27438%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to