The British Caving Association

Any views expressed are not necessarily those of the BCA
It is currently Mon 28 Jul 2014 15:22

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sat 28 Feb 2009 15:58 
Online
User avatar

Joined: Thu 16 Mar 2006 23:45
Posts: 304
Here's another weird problem I have had, trying to get the BCRA web pages to run on the new server...

One particular page threw up the annoyingly vague JavaScript "syntax error" when I tried to run it on BCA's new server. It was fine on the old server, and on localhost.

I eventually realised that - for what reason I do not know - it had been created with MAC-style line endings (i.e. hex 0D). when I converted these to PC-style (0D0A) it ran without error. (Perhaps Unix-style line endings of 0A would also have worked? - let's just see: yes they do work).

The syntax error was caused because JavaScript was expecting to see a line ending, and didnt.

Im assuming - guessing - that the old server I was running the BCRA site on ws either Windows-based or had some property set somewhere to map line endings.


Top
 Profile  
 
PostPosted: Wed 08 Apr 2009 12:05 
Online
User avatar

Joined: Thu 16 Mar 2006 23:45
Posts: 304
David Gibson wrote:
when I converted these to PC-style (0D0A) it ran without error.


reminder to myself: use WildEdit. Search for regexp \r([^\n]) and replace with \r\n$1 in files *.html


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: David Gibson and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group