Eggshen Posted May 10, 2004 Posted May 10, 2004 This may be an easy fix, I'm sure someone's encountered it before, but my search on this site produced nothing... I have a field that has check boxes with a value list. When I display this field on the web, it makes returns after each value of the checklist. Normally this would be fine, but it's being used in a document.write, which is freaking out because of the line break. Is there any way (perhaps along the lines of the 'raw' attribute), that I can have this data displayed without line breaks?
Eggshen Posted May 10, 2004 Author Posted May 10, 2004 Is there a CDML solution? Or javascript not worrying so much about a break in the line?
Eggshen Posted May 10, 2004 Author Posted May 10, 2004 Well, using the 'break' encoding offers a decent solution...The javascript works but there is a <br> between each value.
Garry Claridge Posted May 11, 2004 Posted May 11, 2004 Here is some Javascript that you can combine with the [FMP-Field:xxx,Break] tag. <body>The first Line<br> <script> myfield = "hello<br>World<br>from<br>Garry."; document.write(myfield.replace(/<br>/g, " ")); document.write("<br>"); </script> The Last Line</body> Hope this helps. Garry
Eggshen Posted May 11, 2004 Author Posted May 11, 2004 Awesome, I dont know much javascript, so that is extremely helpful!
Recommended Posts
This topic is 7578 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now