Welcome Guest [Log In] [Register]
We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Multiquote (on) Multiquote (off)
Add Reply
Website Maker question; linebreaks/javascript
Topic Started: Oct 29 2011, 09:03 PM (375 Views)
TheMasterDude
Member
[ * ]
I'm using some javascript in a website maker file for my forum and for some reason when I click "edit page" it changes all of the instances of "\n" into the ascii code for \

Code:
 
&#092 ; n


here is a sample of what I mean

Code:
 
if (rank1 == 1 && roll < 51)
{
var rank2 = "I giveth and I taketh away \n This time, I tooketh, you die... \n\n Next time, wait for a better rank, gets you in My better graces.";
}



And when it is printed out what I see is:
Code:
 

"I giveth and I taketh away &#092 ;n This time, I tooketh, you die... &#092 ;n&#092 ;nNext time, wait for a better rank, gets you in My better graces."


Is there some way to fix this so that it does a line break instead?
Edited by TheMasterDude, Oct 29 2011, 09:19 PM.
Offline Profile Quote Post Goto Top
 
Quozzo-ZNS
Member Avatar
Member
[ *  * ]
The website maker automatically parses some characters which are needed in JS, including the OR || so your best saving it as a file and then linking to it using
Code: HTML
 
<script type='text/javascript' src='JSFILEURL'></script>
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · ZetaBoards - Theme & Code Support · Next Topic »
Add Reply